Skip to content

Commit

Permalink
- get all entries from the incidence matrix, even the negatives in ge…
Browse files Browse the repository at this point in the history
…tSimEqsOfSimVar

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20682 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed May 19, 2014
1 parent e0684f1 commit 8d54d93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Compiler/BackEnd/SimCodeUtil.mo
Expand Up @@ -508,6 +508,7 @@ algorithm
case (_, dae, dlow as BackendDAE.DAE(shared=BackendDAE.SHARED(functionTree=functionTree)), _)
equation
// get all the used functions from the function tree

funcelems = DAEUtil.getFunctionList(functionTree);
part_func_elems = PartFn.createPartEvalFunctions(funcelems);
(dae, part_func_elems) = PartFn.partEvalDAE(dae, part_func_elems);
Expand Down Expand Up @@ -12706,7 +12707,7 @@ algorithm
simVars := List.map1(bVars,getSimVarForBackendVar,map);
end getSimVarsInSimEq;

public function getSimEqsOfSimVar"gets the indeces for the simVars occuring in the given simEq
public function getSimEqsOfSimVar"gets the indeces for the simEqs for the given simVar
author:Waurich TUD 2014-04"
input Integer simVar;
input SimCode.BackendMapping map;
Expand All @@ -12722,8 +12723,10 @@ algorithm
SimCode.BACKENDMAPPING(m=m,mT=mt,eqMapping=eqMapping,varMapping=varMapping) := map;
bVar := getBackendVarForSimVar(simVar,map);
bEqs := arrayGet(mt,bVar);
bEqs := List.filter1OnTrue(bEqs,intGe,0);
//bEqs := List.filter1OnTrue(bEqs,intGe,0);
bEqs := List.map(bEqs,intAbs);
simEqs := List.map1(bEqs,getSimEqsForBackendEqs,map);
simEqs := List.unique(simEqs);
end getSimEqsOfSimVar;

public function getReqSimEqSysForSimVar
Expand Down

0 comments on commit 8d54d93

Please sign in to comment.