Changeset 13720 for trunk


Ignore:
Timestamp:
Oct 10, 2019 2:42:38 PM (2 months ago)
Author:
Jonathan Kämpe
Message:

#5844 Merging refactoring to trunk

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Compiler/ModelicaMiddleEnd/src/jastadd/structural/Symbolic.jrag

    r13636 r13720  
    217217    private static Boolean FEquation.nominalAllowsDivision(FExp factor, FVariable var, double tol) {
    218218        if (factor.variability().constantVariability()) {
    219             FExp nominal = factor.dynamicFExp(var.nominal());
    220             if (nominal.variability().constantVariability() &&
    221                     Math.abs(factor.ceval().realValue()) *
    222                     nominal.ceval().realValue() < tol) {
    223                 return false;
     219            FExp varNominalExp = factor.dynamicFExp(var.nominal());
     220            if (varNominalExp.variability().constantVariability()) {
     221                double factorNominal = Math.abs(factor.ceval().realValue());
     222                double varNominal    = varNominalExp.ceval().realValue();
     223                double totalNominal  = factorNominal * varNominal;
     224                if (totalNominal < tol) {
     225                    return false;
     226                }
    224227            }
    225228        }
  • trunk/Compiler/ModelicaMiddleEnd/test/modelica/EquationSolvingTests.mo

    r13636 r13720  
    3434        FClassMethodTestCase(
    3535            name="ParametricNominal1",
    36             description="",
     36            description="Test that parametric nominal that cannot be evaluated does not lead to exception during equation solving. Instead we handle it as if there was no nominal set.",
    3737            methodName="printDAEBLT",
    3838            methodResult="
Note: See TracChangeset for help on using the changeset viewer.