diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst index 04921d89ac5a0ea1c801ee795a15a40f8ab03553..a1437afa684aa86ec60358986a6dd9482851f633 100644 --- a/doc/manual/source/the-model-file.rst +++ b/doc/manual/source/the-model-file.rst @@ -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 diff --git a/preprocessor b/preprocessor index dc1ec15fc6fec59cc4c70fdb719bf731d7a57c9c..fab3b682c386b9ab7ff26fbb432338e5d1bcf615 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit dc1ec15fc6fec59cc4c70fdb719bf731d7a57c9c +Subproject commit fab3b682c386b9ab7ff26fbb432338e5d1bcf615 diff --git a/tests/lmmcp/rbcii.mod b/tests/lmmcp/rbcii.mod index 03590cabd3eaf38cdb3fe7c15bdbf1c1b0c06717..a61f1d82562f76454abc235338a69d142a89a40e 100644 --- a/tests/lmmcp/rbcii.mod +++ b/tests/lmmcp/rbcii.mod @@ -1,3 +1,9 @@ +/* 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;