Changeset 8ede334 in OpenModelica
- Timestamp:
- 2024-06-21T15:43:54+02:00 (6 days ago)
- Branches:
- master
- Children:
- 02772939, 0422d67a, 0483724a, 1c2530e, 1f65e83e, 3d6a6ba, 3f030e1, 4d1e92c4, 75f0f503, 7e886b6d, 954e35ae, 95ab1834, 9d197a6, adb4b27, c0d0c458, e61cdc26, e762ba3, f2ee82ff, f6e5801b, facded5b
- Parents:
- 537f41e
- git-author:
- kabdelhak <38032125+kabdelhak@…> (06/21/24 15:43:54)
- git-committer:
- GitHub <noreply@…> (06/21/24 15:43:54)
- Location:
- OMCompiler/Compiler/NBackEnd/Classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OMCompiler/Compiler/NBackEnd/Classes/NBEquation.mo
r261d3c8 r8ede334 702 702 case IF_EQUATION() then str + IfEquationBody.toString(eq.body, str + "[----] ", "[-IF-] " + s + EquationAttributes.toString(eq.attr, " ")); 703 703 case FOR_EQUATION() then str + forEquationToString(eq.iter, eq.body, "", str + "[----] ", "[FOR-] " + s + EquationAttributes.toString(eq.attr, " ")); 704 case WHEN_EQUATION() then str + WhenEquationBody.toString(eq.body, str + "[----] ", "[WHEN] " + s + EquationAttributes.toString(eq.attr, " ") + "\n [----]");704 case WHEN_EQUATION() then str + WhenEquationBody.toString(eq.body, str + "[----] ", "[WHEN] " + s + EquationAttributes.toString(eq.attr, " ") + "\n"); 705 705 case AUX_EQUATION() then str + "[AUX-] " + s + "Auxiliary equation for " + Variable.toString(Pointer.access(eq.auxiliary)); 706 706 case DUMMY_EQUATION() then str + "[DUMY] (0) Dummy equation."; … … 2524 2524 WhenEquationBody elseWhen; 2525 2525 algorithm 2526 str := elseStr + "when " + Expression.toString(body.condition) + " then \n"; 2526 str := elseStr; 2527 if not selfCall then 2528 str := str + indent; 2529 end if; 2530 str := str + "when " + Expression.toString(body.condition) + " then \n"; 2527 2531 for stmt in body.when_stmts loop 2528 2532 str := str + WhenStatement.toString(stmt, indent + " ") + "\n"; … … 3688 3692 eqn := ExpandableArray.get(i, equations.eqArr); 3689 3693 () := match Pointer.access(eqn) 3694 local 3695 list<Equation> body; 3696 // todo: add for IF and WHEN 3690 3697 case Equation.DUMMY_EQUATION() then (); 3698 case Equation.FOR_EQUATION(body = body) guard(List.all(body, Equation.isDummy)) then (); 3691 3699 else algorithm 3692 3700 eqns := eqn :: eqns; -
OMCompiler/Compiler/NBackEnd/Classes/NBackendDAE.mo
r025d351 r8ede334 336 336 input output BackendDAE bdae; 337 337 algorithm 338 // no output needed, all pointers339 () := match bdae340 local341 EquationPointers equations;342 case MAIN(eqData = BEquation.EQ_DATA_SIM(equations = equations)) algorithm343 _ := EquationPointers.map(equations, function Equation.simplify(name = getInstanceName(), indent = ""));344 then ();345 else ();338 bdae := match bdae 339 local 340 EqData eqData; 341 case MAIN(eqData = eqData as BEquation.EQ_DATA_SIM()) algorithm 342 eqData.equations := EquationPointers.map(eqData.equations, function Equation.simplify(name = getInstanceName(), indent = "")); 343 bdae.eqData := EqData.compress(eqData); 344 then bdae; 345 else bdae; 346 346 end match; 347 347 end simplify;
Note: See TracChangeset
for help on using the changeset viewer.