Skip to content

Commit c9ea075

Browse files
committed
Conflicts: SimulationRuntime/cpp/Include/Core/SimController/ISimController.h
2 parents 69ba949 + 26c02a2 commit c9ea075

File tree

151 files changed

+19509
-21277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+19509
-21277
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Compiler/boot/LoadCompilerInterface.mos
141141
Compiler/boot/Makefile
142142
Compiler/boot/Makefile.depends
143143
Compiler/boot/Makefile.sources
144+
Compiler/boot/patches/*.patch
144145
Compiler/runtime/Makefile
145146
Compiler/runtime/config.unix.h
146147
Compiler/runtime/omc_communication.cc

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected import HashTable;
6868
protected import HashTableCrToExpSourceTpl;
6969
protected import Inline;
7070
protected import List;
71-
protected import SimCodeUtil;
71+
protected import SimCodeFunctionUtil;
7272
protected import SCode;
7373
protected import System;
7474
protected import Types;
@@ -154,7 +154,7 @@ algorithm
154154
neqStr := intString(BackendDAEUtil.equationSize(eqnarr));
155155
nvarStr := intString(BackendVariable.varsSize(vars_1));
156156
Error.assertionOrAddSourceMessage(not Flags.isSet(Flags.DUMP_BACKENDDAE_INFO),Error.BACKENDDAEINFO_LOWER,{neqStr,nvarStr},Absyn.dummyInfo);
157-
SimCodeUtil.execStat("Generate backend data structure");
157+
SimCodeFunctionUtil.execStat("Generate backend data structure");
158158
end lower;
159159

160160
protected function lower2

Compiler/BackEnd/BackendDAEOptimize.mo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,10 @@ protected import ExpressionSolve;
7070
protected import ExpressionSimplify;
7171
protected import Error;
7272
protected import Flags;
73-
protected import Graph;
7473
protected import HashTableExpToIndex;
7574
protected import List;
7675
protected import RewriteRules;
7776
protected import SCode;
78-
protected import System;
7977
protected import SynchronousFeatures;
8078
protected import Types;
8179
protected import Util;

Compiler/BackEnd/BackendDAETransform.mo

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ encapsulated package BackendDAETransform
4242
RCS: $Id$
4343
"
4444

45-
public import Absyn;
4645
public import BackendDAE;
4746
public import DAE;
4847

4948
protected import BackendDAEUtil;
5049
protected import BackendDump;
51-
protected import BackendDAEOptimize;
5250
protected import BackendEquation;
5351
protected import BackendVariable;
5452
protected import ComponentReference;
@@ -59,7 +57,6 @@ protected import Expression;
5957
protected import ExpressionDump;
6058
protected import Flags;
6159
protected import List;
62-
protected import Matching;
6360
protected import SCode;
6461
protected import Sorting;
6562
protected import SymbolicJacobian;
@@ -82,32 +79,36 @@ public function strongComponentsScalar "author: PA
8279
input array<Integer> mapIncRowEqn;
8380
output BackendDAE.EqSystem outSystem;
8481
output BackendDAE.StrongComponents outComps "list of components";
85-
protected
86-
list<list<Integer>> comps;
87-
array<Integer> ass1, ass2;
88-
BackendDAE.IncidenceMatrixT mt;
89-
BackendDAE.EquationArray eqs;
90-
BackendDAE.Variables vars;
91-
array<Integer> markarray;
92-
BackendDAE.StateSets stateSets;
93-
BackendDAE.BaseClockPartitionKind partitionKind;
9482
algorithm
95-
try
96-
BackendDAE.EQSYSTEM(vars, eqs, SOME(_), SOME(mt), BackendDAE.MATCHING(ass1=ass1, ass2=ass2), stateSets=stateSets, partitionKind=partitionKind) := inSystem;
97-
98-
comps := Sorting.TarjanTransposed(mt, ass2);
83+
(outSystem, outComps) := matchcontinue inSystem
84+
local
85+
list<list<Integer>> comps_m;
86+
array<Integer> ass1, ass2;
87+
BackendDAE.IncidenceMatrixT mt;
88+
BackendDAE.EquationArray eqs;
89+
BackendDAE.Variables vars;
90+
array<Integer> markarray;
91+
BackendDAE.StrongComponents comps;
92+
BackendDAE.EqSystem syst;
93+
case syst as BackendDAE.EQSYSTEM(orderedEqs=eqs, m=SOME(_), mT=SOME(mt), matching=BackendDAE.MATCHING(ass1=ass1, ass2=ass2))
94+
algorithm
95+
comps_m := Sorting.TarjanTransposed(mt, ass2);
9996

100-
markarray := arrayCreate(BackendDAEUtil.equationArraySize(eqs), -1);
101-
outComps := analyseStrongComponentsScalar(comps, inSystem, inShared, ass1, ass2, mapEqnIncRow, mapIncRowEqn, 1, markarray);
102-
ass1 := varAssignmentNonScalar(ass1, mapIncRowEqn);
97+
markarray := arrayCreate(BackendDAEUtil.equationArraySize(eqs), -1);
98+
comps := analyseStrongComponentsScalar(comps_m, inSystem, inShared, ass1, ass2, mapEqnIncRow, mapIncRowEqn, 1, markarray);
99+
ass1 := varAssignmentNonScalar(ass1, mapIncRowEqn);
103100

104-
// noscalass2 = eqnAssignmentNonScalar(1, arrayLength(mapEqnIncRow), mapEqnIncRow, ass2, {});
105-
// Frenkel TUD: Do not hand over the scalar incidence Matrix because following modules does not check if scalar or not
106-
outSystem := BackendDAE.EQSYSTEM(vars, eqs, NONE(), NONE(), BackendDAE.MATCHING(ass1, ass2, outComps), stateSets, partitionKind);
107-
else
108-
Error.addInternalError("function strongComponentsScalar failed (sorting strong components)", sourceInfo());
109-
fail();
110-
end try;
101+
// noscalass2 = eqnAssignmentNonScalar(1, arrayLength(mapEqnIncRow), mapEqnIncRow, ass2, {});
102+
// Frenkel TUD: Do not hand over the scalar incidence Matrix because following modules does not check if scalar or not
103+
syst.m := NONE(); syst.mT := NONE(); syst.matching := BackendDAE.MATCHING(ass1, ass2, comps);
104+
then
105+
(syst, comps);
106+
else
107+
algorithm
108+
Error.addInternalError("function strongComponentsScalar failed (sorting strong components)", sourceInfo());
109+
then
110+
fail();
111+
end matchcontinue;
111112
end strongComponentsScalar;
112113

113114
public function eqnAssignmentNonScalar
@@ -159,7 +160,6 @@ protected
159160
BackendDAE.StrongComponent acomp;
160161
Integer mark = imark;
161162
algorithm
162-
163163
for comp in inComps loop
164164
(acomp, mark) := analyseStrongComponentScalar(comp, syst, shared, inAss1, inAss2, mapEqnIncRow, mapIncRowEqn, mark, markarray);
165165
outComps := acomp :: outComps;
@@ -181,12 +181,12 @@ protected function analyseStrongComponentScalar "author: Frenkel TUD 2011-05"
181181
output BackendDAE.StrongComponent outComp;
182182
output Integer omark = imark + 1;
183183
protected
184-
list<Integer> comp, vlst;
185-
list<BackendDAE.Var> varlst;
186-
list<tuple<BackendDAE.Var, Integer>> var_varindx_lst;
187-
BackendDAE.Variables vars;
188-
list<BackendDAE.Equation> eqn_lst;
189-
BackendDAE.EquationArray eqns;
184+
list<Integer> comp, vlst;
185+
list<BackendDAE.Var> varlst;
186+
list<tuple<BackendDAE.Var, Integer>> var_varindx_lst;
187+
BackendDAE.Variables vars;
188+
list<BackendDAE.Equation> eqn_lst;
189+
BackendDAE.EquationArray eqns;
190190
algorithm
191191
try
192192
BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns) := syst;

0 commit comments

Comments
 (0)