Commit a07f3fde authored by Houtan Bastani's avatar Houtan Bastani

fix timing bug with predetermined_variables command and model-local variables

See #1602

(manually cherry-picked from d686275da142e2d1e1afcdb32785c25f25b5a5a7)
parent 4536ed1b
Pipeline #302 passed with stages
in 56 minutes and 8 seconds
...@@ -4593,6 +4593,10 @@ DynamicModel::substituteExpectation(bool partial_information_model) ...@@ -4593,6 +4593,10 @@ DynamicModel::substituteExpectation(bool partial_information_model)
void void
DynamicModel::transformPredeterminedVariables() DynamicModel::transformPredeterminedVariables()
{ {
for (map<int, expr_t>::iterator it = local_variables_table.begin();
it != local_variables_table.end(); it++)
it->second = it->second->decreaseLeadsLagsPredeterminedVariables();
for (int i = 0; i < (int) equations.size(); i++) for (int i = 0; i < (int) equations.size(); i++)
{ {
BinaryOpNode *substeq = dynamic_cast<BinaryOpNode *>(equations[i]->decreaseLeadsLagsPredeterminedVariables()); BinaryOpNode *substeq = dynamic_cast<BinaryOpNode *>(equations[i]->decreaseLeadsLagsPredeterminedVariables());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment