Skip to content

Commit 7795bd9

Browse files
author
Jens Frenkel
committed
switch off equality equations to alias variables in BackendDAE.create phase (fix failing tests befor switch on again)
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13329 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent a974b38 commit 7795bd9

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Compiler/BackEnd/BackendDAE.mo

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,15 @@ type IncidenceMatrixT = IncidenceMatrix "IncidenceMatrixT : a list of equation i
391391
- Incidence Matrix T" ;
392392

393393
public
394-
uniontype Solvability
394+
uniontype Solvability
395395
record SOLVABILITY_SOLVED "Equation is already solved for the variable" end SOLVABILITY_SOLVED;
396396
record SOLVABILITY_CONSTONE "Coefficient is equal 1 or -1" end SOLVABILITY_CONSTONE;
397397
record SOLVABILITY_CONST "Coefficient is constant" end SOLVABILITY_CONST;
398398
record SOLVABILITY_PARAMETER "Coefficient contains parameters"
399-
Boolean b "false if the partial derivative is zero";
399+
Boolean b "false if the partial derivative is zero";
400400
end SOLVABILITY_PARAMETER;
401401
record SOLVABILITY_TIMEVARYING "Coefficient contains variables, is time varying"
402-
Boolean b "false if the partial derivative is zero";
402+
Boolean b "false if the partial derivative is zero";
403403
end SOLVABILITY_TIMEVARYING;
404404
record SOLVABILITY_NONLINEAR "The variable occurse nonlinear in the equation." end SOLVABILITY_NONLINEAR;
405405
record SOLVABILITY_UNSOLVABLE "The variable occurse in the equation, but it is not posible to solve
@@ -475,7 +475,7 @@ type ConstraintEquations = list<tuple<Integer,list<Equation>>>;
475475

476476

477477
public
478-
uniontype StateOrder
478+
uniontype StateOrder
479479
record STATEORDER
480480
HashTableCG.HashTable hashTable "x -> dx";
481481
HashTable3.HashTable invHashTable "dx -> {x,y,z}";
@@ -485,7 +485,7 @@ end StateOrder;
485485
public
486486
uniontype StrongComponent
487487
record SINGLEEQUATION
488-
Integer eqn;
488+
Integer eqn;
489489
Integer var;
490490
end SINGLEEQUATION;
491491

@@ -494,13 +494,13 @@ uniontype StrongComponent
494494
list<Integer> vars "be carefule with states, this are solved for der(x)";
495495
Option<list<tuple<Integer, Integer, Equation>>> jac;
496496
JacobianType jacType;
497-
end EQUATIONSYSTEM;
497+
end EQUATIONSYSTEM;
498498

499499
record MIXEDEQUATIONSYSTEM
500500
StrongComponent condSystem;
501501
list<Integer> disc_eqns;
502502
list<Integer> disc_vars;
503-
end MIXEDEQUATIONSYSTEM;
503+
end MIXEDEQUATIONSYSTEM;
504504

505505
record SINGLEARRAY
506506
Integer eqn;
@@ -522,7 +522,7 @@ uniontype StrongComponent
522522
list<Integer> residualequations;
523523
list<tuple<Integer,list<Integer>>> otherEqnVarTpl "list of tuples of indexes for Equation and Variable solved in the equation, in the order they have to be solved";
524524
Boolean linear;
525-
end TORNSYSTEM;
525+
end TORNSYSTEM;
526526

527527
end StrongComponent;
528528

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,10 @@ algorithm
276276

277277
// effort variable equality equations, seperated to generate alias variables
278278
case (DAE.EQUEQUATION(cr1 = _),_,_,_,_,_,_,_,_,_,_,_,_)
279+
equation
280+
eqns = lowerEqn(inElement,functionTree,inEqnsLst);
279281
then
280-
(inVars,inKnVars,inExVars,inEqnsLst,inREqnsLst,inIEqnsLst,inConstraintLst,inClassAttributeLst,inWhenClauseLst,inExtObjClasses,inElement::iAliaseqns);
282+
(inVars,inKnVars,inExVars,eqns,inREqnsLst,inIEqnsLst,inConstraintLst,inClassAttributeLst,inWhenClauseLst,inExtObjClasses,/*inElement::*/iAliaseqns);
281283

282284
// a solved equation
283285
case (DAE.DEFINE(componentRef = _),_,_,_,_,_,_,_,_,_,_,_,_)

0 commit comments

Comments
 (0)