Ticket #2429: RemoveSimpleEquations.mo.patch

File RemoveSimpleEquations.mo.patch, 1.9 KB (added by Jens Frenkel, 11 years ago)

patch for #2429

  • Compiler/BackEnd/RemoveSimpleEquations.mo

     
    7575protected import Types;
    7676protected import Util;
    7777
    78 protected type EquationAttributes = tuple<DAE.ElementSource, Boolean> "eqnAttributes";
     78protected type EquationAttributes = tuple<DAE.ElementSource, Boolean> "eqnAttributes(source,differentiated)";
    7979
    8080protected
    8181uniontype SimpleContainer
     
    20012001       vsattr = Debug.bcallret5(replacable and replaceble1, addVarSetAttributes, v, negate, mark, simpleeqnsarr, vsattr, vsattr);
    20022002       rows = List.removeOnTrue(r, intEq, iMT[i]);
    20032003       _ = arrayUpdate(iMT, i, {});
    2004        (vars, eqnslst, shared, repl, vsattr) = traverseAliasTree(rows, i, exp1, SOME(expcr), negate, SOME(DAE.RCONST(0.0)), mark, simpleeqnsarr, iMT, unreplacable, vars, eqnslst, shared, repl, vsattr);
     2004       (vars, eqnslst, shared, repl, vsattr) = traverseAliasTree(rows, i, exp, SOME(expcr), negate, SOME(DAE.RCONST(0.0)), mark, simpleeqnsarr, iMT, unreplacable, vars, eqnslst, shared, repl, vsattr);
    20052005     then
    20062006       (vars, eqnslst, shared, repl);
    20072007   // time set
     
    20212021       vsattr = addVarSetAttributes(v, negate, mark, simpleeqnsarr, EMPTYVARSETATTRIBUTES);
    20222022       rows = List.removeOnTrue(r, intEq, iMT[i]);
    20232023       _ = arrayUpdate(iMT, i, {});
    2024        (vars, eqnslst, shared, repl, vsattr) = traverseAliasTree(rows, i, exp1, SOME(expcr), negate, SOME(dexp), mark, simpleeqnsarr, iMT, unreplacable, vars, eqnslst, shared, repl, vsattr);
     2024       (vars, eqnslst, shared, repl, vsattr) = traverseAliasTree(rows, i, exp, SOME(expcr), negate, SOME(dexp), mark, simpleeqnsarr, iMT, unreplacable, vars, eqnslst, shared, repl, vsattr);
    20252025     then
    20262026       (vars, eqnslst, shared, repl);
    20272027   // constant set