Skip to content

Commit

Permalink
- bugfix blt, do not check continues vars in relations
Browse files Browse the repository at this point in the history
- update path in interaktive readme 

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11286 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Mar 4, 2012
1 parent 298dabc commit 0eb0a96
Show file tree
Hide file tree
Showing 4 changed files with 452 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -6284,7 +6284,7 @@ algorithm
equation
e_1 = e - 1;
eqn = BackendDAEUtil.equationNth(eqns, e_1);
ev = BackendEquation.equationsLstVars({eqn},v,BackendDAEUtil.emptyVars());
ev = BackendEquation.equationsLstVarsWithoutRelations({eqn},v,BackendDAEUtil.emptyVars());
false = BackendVariable.hasContinousVar(BackendDAEUtil.varList(ev));
BackendDAEEXT.markDifferentiated(e) "length gives index of new equation Mark equation as differentiated so it won\'t be differentiated again" ;
(syst,shared,reqns,derivedAlgs1,derivedMultiEqn1) = differentiateEqns(BackendDAE.EQSYSTEM(v,eqns,SOME(m),SOME(mt),matching),shared, es, inFunctions,inDerivedAlgs,inDerivedMultiEqn);
Expand Down
44 changes: 44 additions & 0 deletions Compiler/BackEnd/BackendEquation.mo
Expand Up @@ -143,6 +143,50 @@ algorithm
end matchcontinue;
end getZeroCrossingIndicesFromWhenClause2;

public function equationsLstVarsWithoutRelations
"function: equationsLstVarsWithoutRelations
author: Frenkel TUD 2012-03
From the equations and a variable array return all
occuring variables form the array."
input list<BackendDAE.Equation> inEquationLst;
input BackendDAE.Variables inVars;
input BackendDAE.Variables inVars1;
output BackendDAE.Variables outVars;
algorithm
(_,(_,outVars)) := traverseBackendDAEExpsEqnList(inEquationLst,checkEquationsVarsWithoutRelations,(inVars,inVars1));
end equationsLstVarsWithoutRelations;

public function equationsVarsWithoutRelations
"function: equationsVarsWithoutRelations
author: Frenkel TUD 2012-03
From the equations and a variable array return all
occuring variables form the array without relations."
input BackendDAE.EquationArray inEquations;
input BackendDAE.Variables inVars;
output BackendDAE.Variables outVars;
algorithm
outVars := BackendDAEUtil.emptyVars();
((_,outVars)) := BackendDAEUtil.traverseBackendDAEExpsEqns(inEquations,checkEquationsVarsWithoutRelations,(inVars,outVars));
end equationsVarsWithoutRelations;

protected function checkEquationsVarsWithoutRelations
input tuple<DAE.Exp, tuple<BackendDAE.Variables,BackendDAE.Variables>> inTpl;
output tuple<DAE.Exp, tuple<BackendDAE.Variables,BackendDAE.Variables>> outTpl;
algorithm
outTpl :=
matchcontinue inTpl
local
DAE.Exp exp;
BackendDAE.Variables vars,vars1;
case ((exp,(vars,vars1)))
equation
((_,(_,vars1))) = Expression.traverseExpWithoutRelations(exp,checkEquationsVarsExp,(vars,vars1));
then
((exp,(vars,vars1)));
case inTpl then inTpl;
end matchcontinue;
end checkEquationsVarsWithoutRelations;

public function equationsLstVars
"function: equationsLstVars
author: Frenkel TUD 2011-05
Expand Down

0 comments on commit 0eb0a96

Please sign in to comment.