Skip to content

Commit

Permalink
- test only if all variables the algorithm should be solved for part …
Browse files Browse the repository at this point in the history
…of the outputs of the algorithm

- move linearize/test_01 back to working tests

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12650 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Aug 23, 2012
1 parent 16612f8 commit 6517df6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Compiler/BackEnd/SimCode.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6117,8 +6117,8 @@ algorithm
equation
solvedVars = List.map(vars,BackendVariable.varCref);
algOutVars = CheckModel.algorithmOutputs(alg);
// The variables solved for and the output variables of the algorithm must be the same.
true = List.setEqualOnTrue(solvedVars,algOutVars,ComponentReference.crefEqualNoStringCompare);
// The variables solved for musst all be part of the output variables of the algorithm.
List.map2AllValue(solvedVars,List.isMemberOnTrue,true,algOutVars,ComponentReference.crefEqualNoStringCompare);
DAE.ALGORITHM_STMTS(algStatements) = BackendDAEUtil.collateAlgorithm(alg,NONE());
then
({SES_ALGORITHM(iuniqueEqIndex,algStatements)},iuniqueEqIndex+1);
Expand All @@ -6128,8 +6128,8 @@ algorithm
equation
solvedVars = List.map(vars,BackendVariable.varCref);
algOutVars = CheckModel.algorithmOutputs(alg);
// The variables solved for and the output variables of the algorithm must be the same.
true = List.setEqualOnTrue(solvedVars,algOutVars,ComponentReference.crefEqualNoStringCompare);
// The variables solved for musst all be part of the output variables of the algorithm.
List.map2AllValue(solvedVars,List.isMemberOnTrue,true,algOutVars,ComponentReference.crefEqualNoStringCompare);
DAE.ALGORITHM_STMTS(algStatements) = BackendDAEUtil.collateAlgorithm(alg,NONE());
algStatements = BackendDAEUtil.removediscreteAssingments(algStatements,BackendDAEUtil.listVar(vars));
then
Expand All @@ -6140,8 +6140,8 @@ algorithm
equation
solvedVars = List.map(vars,BackendVariable.varCref);
algOutVars = CheckModel.algorithmOutputs(alg);
// The variables solved for and the output variables of the algorithm must be the same.
false = List.setEqualOnTrue(solvedVars,algOutVars,ComponentReference.crefEqualNoStringCompare);
// The variables solved for musst all be part of the output variables of the algorithm.
failure(List.map2AllValue(solvedVars,List.isMemberOnTrue,true,algOutVars,ComponentReference.crefEqualNoStringCompare));
algStr = DAEDump.dumpAlgorithmsStr({DAE.ALGORITHM(alg,source)});
message = stringAppendList({"Inverse Algorithm needs to be solved for in ",algStr,". This has not been implemented yet.\n"});
Error.addMessage(Error.INTERNAL_ERROR,{message});
Expand Down

0 comments on commit 6517df6

Please sign in to comment.