Opened 8 years ago

Closed 7 years ago

#4274 closed defect (fixed)

Warn about models without enough initial equations by default

Reported by: Francesco Casella Owned by: Lennart Ochel
Priority: critical Milestone: 1.12.0
Component: Backend Version:
Keywords: Cc:

Description

In my experience, non-trivial models without a fully specified initial condition are time bombs. They may work in Dymola and not in OMC, or they may work with one version and not with the next or previous one, etc. This is also well known for the MSL examples.

The root cause of this problem is that the heuristics to pick the missing initial conditions cannot be reliable and give a unique solution, in general. Unfortunately, OMC is by default silent on this potential problem.

This is not really a good idea, and often causes a great deal of unnecessary distress, until one realizes, hey, I should check that, and finally sees it.

To improve the situation, I would strongly suggest to make the -d=initialization option true by default. Initialization is a key step and often determines the success or failure of a simulation, details about it should not be omitted, even to absolute beginners.

Also, the current warning text in this case is just

Warning: Assuming fixed start values for the following X variables

I would suggest to change it to

Warning: The initialization problem is not completely specified. OMC completed it by fixing the start values for the following X variables. For consistent behaviour of the model, it is preferrable to completely specify the initialization problem in the model.

Change History (3)

comment:1 by Lennart Ochel, 8 years ago

Status: newaccepted

comment:2 by Lennart Ochel, 8 years ago

Right now, there is already always a warning if a model contains too less initial conditions.
This is the message without -d=initialization:

The initial conditions are not fully specified. For more information set 
-d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in 
OMNotebook call setCommandLineOptions("-d=initialization").

And if the flag –d=initialization is enabled, then there is a more detailed message:

Assuming fixed start value for the following X variables:
  <list of variables>

So is there really more information needed? Maybe it would be good enough to just improve the messages and keep the flag disables by default.

Last edited 8 years ago by Lennart Ochel (previous) (diff)

in reply to:  2 comment:3 by Francesco Casella, 7 years ago

Resolution: fixed
Status: acceptedclosed

Replying to lochel:

Right now, there is already always a warning if a model contains too less initial conditions.
This is the message without -d=initialization:

The initial conditions are not fully specified. For more information set 
-d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in 
OMNotebook call setCommandLineOptions("-d=initialization").

OK, I guess this is good enough.

Note: See TracTickets for help on using tickets.