From ee9213d77c6ee3fa379059df9f3d168a6657d2de Mon Sep 17 00:00:00 2001 From: Ferhat Date: Fri, 17 Feb 2012 10:50:54 +0100 Subject: [PATCH] Corrects a bug in the computation of the number of leads and lags --- preprocessor/ModelTree.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preprocessor/ModelTree.cc b/preprocessor/ModelTree.cc index baf39213e..bdd2bbd5d 100644 --- a/preprocessor/ModelTree.cc +++ b/preprocessor/ModelTree.cc @@ -801,8 +801,8 @@ ModelTree::reduceBlocksAndTypeDetermination(const dynamic_jacob_map_t &dynamic_j { int curr_variable = it->first; int curr_lag = it->second; - vector::const_iterator it = find(variable_reordered.begin()+first_count_equ, variable_reordered.begin()+(first_count_equ+Blck_Size), curr_variable); - if (it != variable_reordered.begin()+(first_count_equ+Blck_Size)) + vector::const_iterator it1 = find(variable_reordered.begin()+first_count_equ, variable_reordered.begin()+(first_count_equ+Blck_Size), curr_variable); + if (it1 != variable_reordered.begin()+(first_count_equ+Blck_Size)) if (dynamic_jacobian.find(make_pair(curr_lag, make_pair(equation_reordered[count_equ], curr_variable))) != dynamic_jacobian.end()) { if (curr_lag > Lead)