DifferenceEquationFrom VLE
IntroductionThe DifferenceEquation extention allows to develop models that compute the value of one or more real variables in t depends on itself at t-1 t-2, ... and according to other real variables at t, t-1 t-2, ... We called it the difference equations but this extension is more general because only the above property is respected. There are three ways to handle the difference equations:
DifferenceEquation::SimpleThe Difference::Equation class supports the first way to define Difference Equation: one model by equation. The structureYou must define three types of port:
update ports are defined as input and output if the equation integrates another variables managed by other equations or any other model managing the evolution of a numeric variable (eg QSS ). For these other models, it must respect a certain protocol. <in> <port name="update" /> <port name="request" /> <port name="perturb" /> </in> <out> <port name="update" /> <port name="response" /> </out> All ports are optional:
If several equations (in this example m1 and m2) are mutually dependent, it must connect the update ports together. <connection type="internal"> <origin model="m1" port="update" /> <destination model="m2" port="update" /> </connection> <connection type="internal"> <origin model="m2" port="update" /> <destination model="m1" port="update" /> </connection> Of course, if model denoted m2 needs only the variable m1 then only my first connection is required. Remark: the structure and protocol are identical to that of QSS, it allows to build models based on differential equations and based on difference equations. InitialisationsHow to write a model based on DifferenceEquation::Simple?DifferenceEquation::MultipleThe structureInitialisationsHow to write a model based on DifferenceEquation::Multiple?How to perturb a DifferenceEquation model?How to query a DifferenceEquation model?Coupling with a no DifferenceEquation modelCookbookTo increase the history size |