Corrects a bug in the computation of the number of leads and lags

issue#70
Ferhat 2012-02-17 10:50:54 +01:00
parent 255d64e6d1
commit 21996d79a8
1 changed files with 2 additions and 2 deletions

View File

@ -801,8 +801,8 @@ ModelTree::reduceBlocksAndTypeDetermination(const dynamic_jacob_map_t &dynamic_j
{
int curr_variable = it->first;
int curr_lag = it->second;
vector<int>::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<int>::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)