Skip to content

Commit

Permalink
- added missing files
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24632 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Feb 19, 2015
1 parent 3b73d9e commit 0a284a1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Compiler/BackEnd/BackendEquation.mo
Expand Up @@ -2838,6 +2838,8 @@ algorithm
then exp1;
case(BackendDAE.COMPLEX_EQUATION(right = exp1))
then exp1;
case(BackendDAE.WHEN_EQUATION(whenEquation=BackendDAE.WHEN_EQ(condition=DAE.BCONST(bool=true),right=exp1)))
then exp1;
else
equation print("BackendEquation.getEquationRHS failed!\n!");
then fail();
Expand All @@ -2861,8 +2863,10 @@ algorithm
then Expression.crefExp(cref);
case(BackendDAE.COMPLEX_EQUATION(left = exp1))
then exp1;
case(BackendDAE.WHEN_EQUATION(whenEquation=BackendDAE.WHEN_EQ(condition=DAE.BCONST(bool=true),left=cref)))
then Expression.crefExp(cref);
else
equation print("BackendEquation.getEquationLHS failed!\n!");
equation print("BackendEquation.getEquationLHS failed!\n");
then fail();
end matchcontinue;
end getEquationLHS;
Expand Down
21 changes: 21 additions & 0 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -367,6 +367,13 @@ algorithm
outHasStartValue := DAEUtil.hasStartAttr(attr);
end varHasStartValue;

public function varHasNoStartValue
input BackendDAE.Var inVar;
output Boolean outHasNoStartValue;
algorithm
outHasNoStartValue := not varHasStartValue(inVar);
end varHasNoStartValue;

public function varStartOrigin "author: Frenkel TUD
Returns the StartOrigin of a variable."
input BackendDAE.Var v;
Expand Down Expand Up @@ -1660,6 +1667,20 @@ algorithm
outVar := BackendDAE.VAR(cr, kind, dir, prl, tp, bind, v, dim, source, attr, ts, comment, ct);
end copyVarNewName;

public function setVarKindForVar"updates the varkind for an indexed var inside the variable-array.
author:Waurich TUD 2015-02"
input Integer idx;
input BackendDAE.VarKind kind;
input BackendDAE.Variables varsIn;
output BackendDAE.Variables varsOut;
protected
BackendDAE.Var var;
algorithm
var := getVarAt(varsIn,idx);
var := setVarKind(var,kind);
varsOut := setVarAt(varsIn,idx,var);
end setVarKindForVar;

public function setVarsKind "author: lochel
This function sets the BackendDAE.VarKind of a variable-list."
input list<BackendDAE.Var> inVars;
Expand Down

0 comments on commit 0a284a1

Please sign in to comment.