Skip to content

Commit

Permalink
Add functions setVars and setEqs to BackendDAEUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
gossen authored and OpenModelica-Hudson committed Jun 22, 2015
1 parent 30ddceb commit 7ae1fb4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -8092,6 +8092,34 @@ algorithm
BackendDAE.DAE(shared=BackendDAE.SHARED(knownVars=outKnownVars)) := inDAE;
end getKnownVars;

public function setVars
input BackendDAE.BackendDAE inDAE;
input BackendDAE.Variables inVars;
output BackendDAE.BackendDAE outDAE;
protected
BackendDAE.EqSystems systs;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
algorithm
BackendDAE.DAE(syst::systs, shared) := inDAE;
syst := setEqSystVars(syst, inVars);
outDAE := BackendDAE.DAE(syst::systs, shared);
end setVars;

public function setEqs
input BackendDAE.BackendDAE inDAE;
input BackendDAE.EquationArray inEqs;
output BackendDAE.BackendDAE outDAE;
protected
BackendDAE.EqSystems systs;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
algorithm
BackendDAE.DAE(syst::systs, shared) := inDAE;
syst := setEqSystEqs(syst, inEqs);
outDAE := BackendDAE.DAE(syst::systs, shared);
end setEqs;

public function setAliasVars "author: lochel"
input BackendDAE.BackendDAE inDAE;
input BackendDAE.Variables inAliasVars;
Expand Down

0 comments on commit 7ae1fb4

Please sign in to comment.