Skip to content
Snippets Groups Projects
Verified Commit 656c1300 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

More flexible syntax for complementarity conditions

parent 90e703ad
Branches
Tags
No related merge requests found
Pipeline #10488 passed
......@@ -3929,11 +3929,13 @@ speed-up on large models.
 
would be wrong.
 
Note that in the current implementation, the content of the
complementarity condition is not parsed by the preprocessor. The
inequalities must therefore be as simple as possible: an
endogenous variable, followed by a relational operator,
followed by a number (not a variable, parameter or expression).
Note that both the lower and the upper bounds can be specified at the
same time in a given complementarity condition. Moreover, arbitrary
functions of parameters can appear in the bounds. As an example, the
following complementarity condition is syntactically correct (assuming
that ``alpha`` is a parameter):
``… ⟂ -1.94478 < r < 1+2*alpha;``
 
.. option:: endogenous_terminal_period
 
......
Subproject commit dc1ec15fc6fec59cc4c70fdb719bf731d7a57c9c
Subproject commit fab3b682c386b9ab7ff26fbb432338e5d1bcf615
/* Tests the MCP solver on a RBC model with irreversible investment.
An additional (dummy) upper bound on investment has been added, to test the
extended syntax with both lower and upper bounds, and parameters in the
bound. */
var k, y, L, c, i, A, a, mu;
varexo epsilon;
parameters beta, theta, tau, alpha, psi, delta, rho, Astar, sigma;
......@@ -21,7 +27,7 @@ model;
k = y-c+(1-delta)*k(-1);
i = k-(1-delta)*k(-1);
mu = 0 ⟂ i > 0;
mu = 0 ⟂ 1+2*alpha > i > 0;
end;
steady_state_model;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment