Skip to content

Commit

Permalink
Make dummy states derivatives bidirectional
Browse files Browse the repository at this point in the history
- Fix ticket:5219

Belonging to [master]:
  - OpenModelica/OMCompiler#2788
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Nov 15, 2018
1 parent 8fe98ae commit a616890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/IndexReduction.mo
Expand Up @@ -3691,7 +3691,7 @@ algorithm
/* Dummy variables are algebraic variables, hence fixed = false */
dattr = BackendVariable.getVariableAttributefromType(tp);
odattr = DAEUtil.setFixedAttr(SOME(dattr), SOME(DAE.BCONST(false)));
dummy_derstate = BackendDAE.VAR(dummyderName,BackendDAE.DUMMY_DER(),dir,prl,tp,NONE(),NONE(),dim,source,odattr,ts,hideResult,comment,ct,io, false);
dummy_derstate = BackendDAE.VAR(dummyderName,BackendDAE.DUMMY_DER(),DAE.BIDIR(),prl,tp,NONE(),NONE(),dim,source,odattr,ts,hideResult,comment,ct,io, false);
kind = if intEq(dn,0) then BackendDAE.DUMMY_STATE() else BackendDAE.DUMMY_DER();
dummy_state = BackendDAE.VAR(name,kind,dir,prl,tp,NONE(),NONE(),dim,source,odattr,ts,hideResult,comment,ct,io, false);
dummy_state = if intEq(dn,0) then inVar else dummy_state;
Expand Down

0 comments on commit a616890

Please sign in to comment.