Changeset 3ad7933b in OpenModelica
- Timestamp:
- 2016-04-02T22:51:03+02:00 (8 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, master, omlib-staging
- Children:
- 2ddae713
- Parents:
- 28678f06
- git-author:
- vruge <vruge@…> (04/02/16 22:51:03)
- git-committer:
- hudson <openmodelica@…> (04/02/16 22:51:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/BackEnd/ExpressionSolve.mo
r392b6e6 r3ad7933b 121 121 BackendDAE.EquationAttributes attr; 122 122 DAE.ElementSource source; 123 Boolean isContinuousIntegration = BackendDAEUtil.isSimulationDAE(shared);123 //Boolean isContinuousIntegration = BackendDAEUtil.isSimulationDAE(shared); 124 124 algorithm 125 125 BackendDAE.EQUATION(exp=e1, scalar=e2, source=source,attr=attr) := eqn; … … 132 132 133 133 if (Types.isIntegerOrRealOrSubTypeOfEither(Expression.typeof(e1)) and Types.isIntegerOrRealOrSubTypeOfEither(Expression.typeof(e2))) then 134 (e1, e2) := preprocessingSolve(e1, e2, varexp, SOME(shared.functionTree), NONE(), 0, false);134 (e1, e2) := preprocessingSolve(e1, e2, varexp, SOME(shared.functionTree), NONE(), 0, false); 135 135 end if; 136 136 137 try 137 138 e := solve2(e1, e2, varexp, SOME(shared.functionTree), NONE()); … … 466 467 " 467 468 468 input DAE.Exp inExp1"lhs";469 input DAE.Exp inExp2"rhs";469 input output DAE.Exp x "lhs"; 470 input output DAE.Exp y "rhs"; 470 471 input DAE.Exp inExp3 "DAE.CREF or 'der(DAE.CREF())'"; 471 472 input Option<DAE.FunctionTree> functions; … … 473 474 input Integer idepth; 474 475 input Boolean doInline; 475 output DAE.Exp x;476 output DAE.Exp y;477 476 output list<BackendDAE.Equation> eqnForNewVars = {} "eqn for tmp vars"; 478 477 output list<DAE.ComponentRef> newVarsCrefs = {}; … … 490 489 491 490 algorithm 492 (x, _) := ExpressionSimplify.simplify(inExp1);493 (y, _) := ExpressionSimplify.simplify(inExp2);494 res := Expression.expSub(x, y);495 491 496 492 // split and sort 497 (lhsX, lhsY) := preprocessingSolve5( inExp1, inExp3,true);498 (rhsX, rhsY) := preprocessingSolve5( inExp2, inExp3,true);493 (lhsX, lhsY) := preprocessingSolve5(x, inExp3,true); 494 (rhsX, rhsY) := preprocessingSolve5(y, inExp3,true); 499 495 x := Expression.expSub(lhsX, rhsX); 500 496 y := Expression.expSub(rhsY, lhsY); … … 562 558 end while; 563 559 564 (y,_):= ExpressionSimplify.simplify1(y);560 y := ExpressionSimplify.simplify1(y); 565 561 566 562 /*
Note: See TracChangeset
for help on using the changeset viewer.