Skip to content

Commit

Permalink
- added function SimCodeUtil.getAssignedSimEqSysIdx
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21142 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Jun 17, 2014
1 parent 5cde57e commit df2d71f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Compiler/BackEnd/SimCodeUtil.mo
Expand Up @@ -12697,6 +12697,21 @@ algorithm
simEqs := List.unique(simEqs);
end getReqSimEqsForSimVar;

public function getAssignedSimEqSysIdx"gets the index of the assigned simEqSys for the given simVar idx
author:Waurich TUD 2014-06"
input Integer simVarIdx;
input SimCode.BackendMapping map;
output Integer simEqSysIdx;
protected
Integer bVarIdx,bEqIdx;
array<Integer> varMatch;
algorithm
bVarIdx := getBackendVarForSimVar(simVarIdx,map);
SimCode.BACKENDMAPPING(varMatch = varMatch) := map;
bEqIdx := arrayGet(varMatch,bVarIdx);
simEqSysIdx := getSimEqsForBackendEqs(bEqIdx,map);
end getAssignedSimEqSysIdx;

protected function collectReqSimEqs"gets the previously required equations from the tree and gets the required equations for them and so on
author:Waurich TUD 2014-04"
input Integer eq;
Expand Down

0 comments on commit df2d71f

Please sign in to comment.