Opened 6 years ago

Closed 5 years ago

#5040 closed defect (fixed)

OMC accepts invalid values of parameters

Reported by: casella Owned by: lochel
Priority: blocker Milestone: 1.13.0
Component: Run-time Version:
Keywords: Cc:

Description

Please run the following test case

model TestMinParameter
  parameter Integer p(min = 2) = 1;
  Real x(start = 0, fixed = true);
equation
  der(x) = p - x;
end TestMinParameter;

OMEdit outputs:

assert | warning | The following assertion has been violated at time 0.000000
p >= 2

but then continues with the simulation.

IMHO this model is invalid and should not be simulated at all. We may add a flag to turn violations of min/max attributes in parameters into warnings, but it should be an error by default.

See #4985 for a closely related issue.

Change History (1)

comment:1 Changed 5 years ago by casella

  • Resolution set to fixed
  • Status changed from new to closed

As the -d=warnMinMax has been introduced, we can close this ticket.

Note: See TracTickets for help on using tickets.