Options

For each representation of the model there are two kinds of options:

The different steps of the block decomposition and of the feedback variables determination

Model simplification

In a first step to get ride of nearly zero elements in the jacobian a threshold is used to determine whether a jacobian element has to be considered as null or not. If the absolute value of a jacobian element is below the threshold then it is considered as null and is discarded form the sparse representation of the jacobian. Eliminating nearly zero elements improves the sparsity of the model and hence the simulation time. Note that if the cutoff value is too high then the model properties could be strongly modified and the simulation could fail.

Prologue and Epilogue determination

In a second step, the equations and the variables of the model could be reordered to get purely recursive initial and final blocks. The purely recursive equations are easily found.

Model normalization

To get a block decomposition of the model, each endogenous variable has to be assigned unambiguously to an equation or equivalently the model has to be normalized: This normalization is performed using the maximum cardinality matching with Edmonds’ matching algorithm (Boost-graph library). Attention has to be paid to potential singularity in the matching process (to avoid for example a normalisation where the variable x is assigned to the following equation: y+0*x=2*z). The matching algorithm is applied iteratively using the normalized Jacobian matrix (each row is divided by its maximum absolute value component) with a decreasing cutoff (all the elements in the Jacobian matrix below the cutoff are set to zero) until a matching is found.

Equations renormalization

Once the model has been normalized, the preprocessor tries to rewrite the equations in a normalized form: for the variable x_i associated to the equation i, the equation has of the following form x_i = f(x_1, …, x_{i-1}, x_{i+1}, …, x_n). For equations belonging to a recursive block, the normalized equation has not to be solved but only evaluated. For equations normalized belonging to a simultaneous block, they could be simply evaluated if they belong to the recursive set of the block in the feedback variables determination.

Block decomposition

The simultaneous block composed of equations and endogenous variables that do not belong to the prologue or the epilogue could be split sub recursive blocks. Those sub recursive blocks form the strong component of the graph representation of the model. To find them a depth search Tarjan algorithm is used.

Splitting the variables of a simultaneous block in feedback and recursive variables

The simultaneous blocks computed in the previous step are rewritten in a quasi triangular form. The non normalized equations that could not be evaluated are forced to belong to the feedback variables set. In addition, for dynamic model the static variables associated with non static equation or the non static variables are imposed in the feedback variables set. The equations of the block are reordered as follow:

Description of the ByteCode format

List of tags

Each tag is coded as char.

Appendix: Type of block