Skip to content

Commit

Permalink
Fix start values for algebraic states
Browse files Browse the repository at this point in the history
which are introduces by symEuler
  • Loading branch information
lochel committed Nov 6, 2015
1 parent a14041d commit 2af9d16
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -5874,6 +5874,7 @@ algorithm
case BackendDAE.CONST() then false;
case BackendDAE.DISCRETE() then false;
case BackendDAE.STATE() then false;
case BackendDAE.ALG_STATE() then false;
case BackendDAE.DUMMY_STATE() then false;
else true;
end match;
Expand Down Expand Up @@ -7990,6 +7991,12 @@ algorithm
// true = Expression.isConstValue(e);
then SOME(e);

case (BackendDAE.VAR(varKind = BackendDAE.ALG_STATE(), values = dae_var_attr)) equation
e = DAEUtil.getStartAttrFail(dae_var_attr);
// lochel: #2597
// true = Expression.isConstValue(e);
then SOME(e);

case (BackendDAE.VAR(varKind = BackendDAE.DUMMY_DER(), bindValue = SOME(value))) equation
e = ValuesUtil.valueExp(value);
// lochel: #2597
Expand Down

0 comments on commit 2af9d16

Please sign in to comment.