The engine is now more robust and should reject any expression that does not
conform to the expected form. It is also able to deal with more cases, such as
terms appearing with a minus sign, or variables in the middle of a
three-factors product.
BTW, use a std::tuple for storing the result of the matching inside
PacExpectationNode, and change the order of components within the
structure (variable first, scalar last).
The preprocessor now writes all the symmetric elements in the "hp"
matrix (derivatives of the hessian w.r.t. parameters), for consistency with all
other derivatives output.
Previously it was only writing one of the two symmetric elements, when indices
of endogenous were different.
Also, no longer compute two times symmetric elements in derivation w.r.t.
parameters at order 2, for consistency with derivation w.r.t. endogenous.
It is therefore now necessary to duplicate them in the output to keep behavior
unchanged.
When creating the sparse matrix (in MATLAB or C mode), since storage is in
column-major order, output the first column, then the second, then the third.
This gives a significant performance boost in use_dll mode (at both compilation
and runtime), because it facilitates memory accesses and expression reusage.
On Windows/MinGW, use the -static linking flag. This enforces static linking of
Boost libraries, which is needed on MSYS2.
Also, use AM_CXXFLAGS and AM_LDFLAGS variables for changing flags, since
CXXFLAGS and LDFLAGS are user variables.
New options "mexext" and "matlabroot" are introduced, so that the preprocessor
knows where to find MATLAB and which architecture to compile for.
Only recent gcc is now supported. A set of optimization flags is used so that
compilation goes reasonably fast on large models.
Consequently, options "msvc", "mingw" and "cygwin" have been removed.
For correlations, there is one extra columns (since there are two symbol
indices). MATLAB automatically adds the missing column, while Octave is
stricter when verifying dimensions.
By the way, add a missing comma.
... when an initial value is given to a parameter that is not
estimated.
The generated driver file was crashing with cryptic error message
because we were searching in the first (and second) column of a
potentially empty array with 0 columns. The fix is to initialize the
fields of estimated_params_ with empty arrays with 10 columns (ie
zeros(0, 10)). Also print a message in the matlab command window if
parameter declared in estimated_params_init is not estimated.
Since, in this case, there are less equations than endogenous, the
variable_reordered structure was not filled with enough element, leading to an
invalid memory read when printing M_.state_var.
Ref #637
In particular, it is necessary to turn back DataTree::AddVariable() into a
non-virtual method, because it is called from DataTree's constructor. Enforcing
the absence of leads/lags is now done using a new boolean DataTree::is_static.
Take advantage of the new copy constructor for handling
PlannerObjectiveStatement more elegantly.
Unfortunately it is not possible to implement *move* constructor / assigment
operators, because the reference ExprNode::datatree is not mutable.
This facilitates switching variable types on the fly. In particular, this
allows removing the hack in DynamicModel::updateAfterVariableChange() that way
basically recreating all the nodes after the type change.