DifferenceEquation

Introduction
The 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:
 * individually: a model by equation;
 * as a system: a model for a set of equations;
 * and a generic way: the number of variables involved in the equation is indeterminate.

DifferenceEquation::Simple
The Difference::Equation class supports the first way to define Difference Equation: one model by equation.

The structure
You must define three types of port:
 * Ports for synchronization when several difference equations is coupled: update;
 * Ports for the perturbation of the difference equation:perturb;
 * Ports for interrogation by instantaneous events of the difference equation:request for input andresponse to the output.

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.

All ports are optional:
 * If you do not want to allow the perturbation, no perturb port;
 * If your equation is not integrated into a graph of numerical models and therefore does not depend on other models or do not involve with other numerical models, no update port;
 * If you do not want interroge your model, no request / response port.

If several equations (in this example m1 and m2) are mutually dependent, it must connect the update ports together.

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.