3030 */
3131
3232encapsulated package BackendDAE
33- " file: BackendDAE.mo
33+ " file: BackendDAE.mo
3434 package: BackendDAE
3535 description: BackendDAE contains the datatypes used by the backend.
3636
@@ -148,7 +148,7 @@ uniontype Equation "- Equation"
148148 end ALGORITHM ;
149149
150150 record WHEN_EQUATION
151- Integer size "size of equation" ;
151+ Integer size "size of equation" ;
152152 WhenEquation whenEquation "whenEquation" ;
153153 . DAE . ElementSource source "origin of equation" ;
154154 end WHEN_EQUATION ;
@@ -173,9 +173,9 @@ end Equation;
173173public
174174uniontype WhenEquation "- When Equation"
175175 record WHEN_EQ
176- . DAE . Exp condition "the when-condition" ;
177- . DAE . ComponentRef left "left hand side of equation" ;
178- . DAE . Exp right "right hand side of equation" ;
176+ . DAE . Exp condition "the when-condition" ;
177+ . DAE . ComponentRef left "left hand side of equation" ;
178+ . DAE . Exp right "right hand side of equation" ;
179179 Option < WhenEquation > elsewhenPart "elsewhen equation with the same cref on the left hand side." ;
180180 end WHEN_EQ ;
181181end WhenEquation ;
@@ -184,7 +184,7 @@ public
184184uniontype WhenOperator "- Reinit Statement"
185185 record REINIT
186186 . DAE . ComponentRef stateVar "State variable to reinit" ;
187- . DAE . Exp value "Value after reinit" ;
187+ . DAE . Exp value "Value after reinit" ;
188188 . DAE . ElementSource source "origin of equation" ;
189189 end REINIT ;
190190
@@ -213,9 +213,9 @@ end WhenOperator;
213213public
214214uniontype WhenClause "- When Clause"
215215 record WHEN_CLAUSE
216- . DAE . Exp condition "the when-condition" ;
216+ . DAE . Exp condition "the when-condition" ;
217217 list< WhenOperator > reinitStmtLst "list of reinit statements associated to the when clause." ;
218- Option < Integer > elseClause "index of elsewhen clause" ;
218+ Option < Integer > elseClause "index of elsewhen clause" ;
219219
220220 // HL only needs to know if it is an elsewhen the equations take care of which clauses are related.
221221 // what is HL?
@@ -228,7 +228,7 @@ end WhenClause;
228228public
229229uniontype ZeroCrossing "- Zero Crossing"
230230 record ZERO_CROSSING
231- . DAE . Exp relation_ "function" ;
231+ . DAE . Exp relation_ "function" ;
232232 list< Integer > occurEquLst "list of equations where the function occurs" ;
233233 list< Integer > occurWhenLst "list of when clauses where the function occurs" ;
234234 end ZERO_CROSSING ;
@@ -237,22 +237,22 @@ end ZeroCrossing;
237237public
238238uniontype SampleLookup
239239 record SAMPLE_LOOKUP
240- Integer nSamples "total number of different sample calls" ;
240+ Integer nSamples "total number of different sample calls" ;
241241 list< tuple< Integer , . DAE . Exp , . DAE . Exp >> lookup "sample arguments (index, start, interval)" ;
242242 end SAMPLE_LOOKUP ;
243243end SampleLookup ;
244244
245245public
246246uniontype EventInfo "- EventInfo"
247247 record EVENT_INFO
248- SampleLookup sampleLookup "stores all information regarding sample-calls" ;
248+ SampleLookup sampleLookup "stores all information regarding sample-calls" ;
249249 list< WhenClause > whenClauseLst "list of when clauses. The WhenEquation datatype refer to this list by position" ;
250250 list< ZeroCrossing > zeroCrossingLst "list of zero crossing coditions" ;
251251 list< ZeroCrossing > sampleLst "list of sample as before, used by cpp runtime" ;
252252 // TODO: relationsLst could be removed if cpp runtime is prepared to handle zero-crossing conditions
253253 list< ZeroCrossing > relationsLst "list of zero crossing function as before, used by cpp runtime" ;
254- Integer relationsNumber "stores the number of relation in all zero-crossings" ;
255- Integer numberMathEvents "stores the number of math function that trigger events e.g. floor, ceil, integer, ..." ;
254+ Integer relationsNumber "stores the number of relation in all zero-crossings" ;
255+ Integer numberMathEvents "stores the number of math function that trigger events e.g. floor, ceil, integer, ..." ;
256256 end EVENT_INFO ;
257257end EventInfo ;
258258
@@ -272,26 +272,26 @@ end BackendDAE;
272272
273273uniontype Shared "Data shared for all equation-systems"
274274 record SHARED
275- Variables knownVars "knownVars ; Known variables, i.e. constants and parameters" ;
276- Variables externalObjects "External object variables" ;
277- Variables aliasVars "Data originating from removed simple equations needed to build
278- variables' lookup table (in C output).
279-
280- In that way, double buffering of variables in pre()-buffer, extrapolation
281- buffer and results caching, etc., is avoided, but in C-code output all the
282- data about variables' names, comments, units, etc. is preserved as well as
283- pinter to their values (trajectories)." ;
284- EquationArray initialEqs "initialEqs ; Initial equations" ;
285- EquationArray removedEqs "these are equations that cannot solve for a variable. for example assertions, external function calls, algorithm sections without effect" ;
275+ Variables knownVars "knownVars ; Known variables, i.e. constants and parameters" ;
276+ Variables externalObjects "External object variables" ;
277+ Variables aliasVars "Data originating from removed simple equations needed to build
278+ variables' lookup table (in C output).
279+
280+ In that way, double buffering of variables in pre()-buffer, extrapolation
281+ buffer and results caching, etc., is avoided, but in C-code output all the
282+ data about variables' names, comments, units, etc. is preserved as well as
283+ pinter to their values (trajectories)." ;
284+ EquationArray initialEqs "initialEqs ; Initial equations" ;
285+ EquationArray removedEqs "these are equations that cannot solve for a variable. for example assertions, external function calls, algorithm sections without effect" ;
286286 array< . DAE . Constraint > constraints "constraints (Optimica extension)" ;
287287 array< . DAE . ClassAttributes > classAttrs "class attributes (Optimica extension)" ;
288288 Env . Cache cache;
289289 Env . Env env;
290- . DAE . FunctionTree functionTree "functions for Backend" ;
291- EventInfo eventInfo "eventInfo" ;
290+ . DAE . FunctionTree functionTree "functions for Backend" ;
291+ EventInfo eventInfo "eventInfo" ;
292292 ExternalObjectClasses extObjClasses "classes of external objects, contains constructor & destructor" ;
293- BackendDAEType backendDAEType "indicate for what the BackendDAE is used" ;
294- SymbolicJacobians symjacs "Symbolic Jacobians" ;
293+ BackendDAEType backendDAEType "indicate for what the BackendDAE is used" ;
294+ SymbolicJacobians symjacs "Symbolic Jacobians" ;
295295 end SHARED ;
296296end Shared ;
297297
@@ -385,7 +385,7 @@ end Assignments;
385385
386386public
387387uniontype IndexType
388- record ABSOLUTE "produce incidence matrix with absolute indexes" end ABSOLUTE ;
388+ record ABSOLUTE "produce incidence matrix with absolute indexes" end ABSOLUTE ;
389389 record NORMAL "produce incidence matrix with positive/negative indexes" end NORMAL ;
390390 record SOLVABLE "procude incidence matrix with only solvable entries, for example {a,b,c}[d] then d is skipped" end SOLVABLE ;
391391 record SPARSE "produce incidence matrix as normal, but add for Inputs also a value" end SPARSE ;
@@ -420,7 +420,7 @@ uniontype Solvability
420420 end SOLVABILITY_TIMEVARYING ;
421421 record SOLVABILITY_NONLINEAR "The variable occurse nonlinear in the equation." end SOLVABILITY_NONLINEAR ;
422422 record SOLVABILITY_UNSOLVABLE "The variable occurse in the equation, but it is not posible to solve
423- the equation for it." end SOLVABILITY_UNSOLVABLE ;
423+ the equation for it." end SOLVABILITY_UNSOLVABLE ;
424424end Solvability ;
425425
426426public
@@ -438,14 +438,14 @@ type AdjacencyMatrixTEnhanced = AdjacencyMatrixEnhanced;
438438public
439439uniontype JacobianType "- Jacobian Type"
440440 record JAC_CONSTANT "If jacobian has only constant values, for system
441- of equations this means that it can be solved statically." end JAC_CONSTANT ;
441+ of equations this means that it can be solved statically." end JAC_CONSTANT ;
442442
443443 record JAC_TIME_VARYING "If jacobian has time varying parts, like parameters or
444- algebraic variables" end JAC_TIME_VARYING ;
444+ algebraic variables" end JAC_TIME_VARYING ;
445445
446446 record JAC_NONLINEAR "If jacobian contains variables that are solved for,
447- means that a nonlinear system of equations needs to be
448- solved" end JAC_NONLINEAR ;
447+ means that a nonlinear system of equations needs to be
448+ solved" end JAC_NONLINEAR ;
449449
450450 record JAC_NO_ANALYTIC "No analytic jacobian available" end JAC_NO_ANALYTIC ;
451451end JacobianType ;
@@ -460,11 +460,11 @@ end IndexReduction;
460460public
461461uniontype EquationConstraints "- Equation Constraints"
462462 record ALLOW_UNDERCONSTRAINED "for e.g. initial eqns.
463- where not all variables
464- have a solution" end ALLOW_UNDERCONSTRAINED ;
463+ where not all variables
464+ have a solution" end ALLOW_UNDERCONSTRAINED ;
465465
466466 record EXACT "exact as many equations
467- as variables" end EXACT ;
467+ as variables" end EXACT ;
468468end EquationConstraints ;
469469
470470public
@@ -563,17 +563,17 @@ public
563563type SymbolicJacobians = list< tuple< Option < SymbolicJacobian > , SparsePattern , SparseColoring >> ;
564564
565565public
566- type SymbolicJacobian = tuple< BackendDAE , // symbolic equation system
567- String , // Matrix name
568- list< Var > , // diff vars
569- list< Var > , // result diffed equation
570- list< Var > // all diffed equation
571- > ;
566+ type SymbolicJacobian = tuple< BackendDAE , // symbolic equation system
567+ String , // Matrix name
568+ list< Var > , // diff vars
569+ list< Var > , // result diffed equation
570+ list< Var > // all diffed equation
571+ > ;
572572
573573public
574574type SparsePattern = tuple< list< tuple< . DAE . ComponentRef , list< . DAE . ComponentRef >>>, // column-wise sparse pattern
575- tuple< list< . DAE . ComponentRef > , // diff vars
576- list< . DAE . ComponentRef >>>; // diffed vars
575+ tuple< list< . DAE . ComponentRef > , // diff vars
576+ list< . DAE . ComponentRef >>>; // diffed vars
577577
578578public
579579type SparseColoring = list< list< . DAE . ComponentRef >> ; // coloring
0 commit comments