Commit 3459e1ff authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor: max lead/lags in the model are no longer affected by lead/lags...

Preprocessor: max lead/lags in the model are no longer affected by lead/lags on parameters (closes #153)
parent 479b2be6
......@@ -3111,10 +3111,14 @@ DynamicModel::computeDerivIDs()
int lag = it->second;
SymbolType type = symbol_table.getType(it->first);
// Setting maximum and minimum lags
if (max_lead < lag)
/* Setting maximum and minimum lags.
We don't want these to be affected by lead/lags on parameters: they
are accepted for facilitating variable flipping, but are simply
ignored. */
if (max_lead < lag && type != eParameter)
max_lead = lag;
else if (-max_lag > lag)
else if (-max_lag > lag && type != eParameter)
max_lag = -lag;
switch (type)
......
Supports Markdown
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