Opened 7 years ago

Last modified 6 years ago

#4451 assigned enhancement

Unspecific error message: The given system is mixed-determined.

Reported by: olivleno Owned by: lochel
Priority: high Milestone: 2.0.0
Component: Backend Version: v1.11.0
Keywords: mixed-determined Cc:

Description

"The given system is mixed-determined. [index > 3]
Please checkout the option "+maxMixedDeterminedIndex"

The documentation of the compiler flag says:
"--maxMixedDeterminedIndex
Sets the maximum mixed-determined index that is handled by the initialization.
Integer (default 3)."

These messages should contain a hint about what is meant by a mixed determined system and its index. Based in the brief description of the compiler flag one can guess that it's probably related to the initialization.

A hint what to look at in the model when this error message is thrown would be important.

In my case I'm not even sure if it's a bug in my model or a bug in OMC.

Change History (4)

comment:1 Changed 7 years ago by olivleno

From Lennart:
this is related the initialization. Mixed-determined means that the initialization problem is under- and over-determined at the same time. Under-determined problems are AFAIK always model issues. If you can get rid of the missing initial conditions, then the message should disappear. However, the model will then still be over-determined which is not trivial to solve. But in some cases it works quite good.

You can use the flag –d=initialization to get the list of variables for which OpenModelica automatically adds initial conditions. This choice is not unique and should always be part of the model. Probably the choice is bad which leads to a structural singular system.

comment:2 Changed 7 years ago by olivleno

Finally I opened my model in Dymola and got this error message.
Would be nice to have something similar in OMC.

The initialization problem is overspecified for variables of element type Real.
There are 10 too many scalar conditions.
To correct it you can
inactivate start values for
M_EM_Map.nextTimeEventScaled_.start(start = 0)
n_EM_Map.nextTimeEventScaled_.start(start = 0)
electricMachine.electricMachineHeatFlow.Stator.T = electricMachine.electricMachineHeatFlow.T_S_Init;
electricMachine.electricMachineHeatFlow.Rotor.T = electricMachine.electricMachineHeatFlow.T_R_Init;
electricMachine.electricMachineHeatFlow.Housing.T = electricMachine.electricMachineHeatFlow.T_H_Init;
isolatedPipe7.V_flow = VFlowInit;
isolatedPipe5.V_flow = VFlowInit;
accumulator.V_flow = VFlowInit;
pump1.V_flow = VFlowInit;

remove initial equations:
algorithm
if (electricMachine.coolantVolume.dpMap.tableOnFile) then
electricMachine.coolantVolume.dpMap.tableOnFileRead := Modelica.Blocks.Tables.CombiTable2D.readTableData (
electricMachine.coolantVolume.dpMap.tableID,
false,
electricMachine.coolantVolume.dpMap.verboseRead);
else
electricMachine.coolantVolume.dpMap.tableOnFileRead := 1.0;
end if;

comment:3 Changed 7 years ago by lochel

  • Component changed from *unknown* to Backend
  • Milestone changed from Future to 2.0.0
  • Owner changed from somebody to lochel
  • Status changed from new to assigned

I guess I can improve the current notifications a bit.

comment:4 Changed 6 years ago by anonymous

Hi All, I justed want to add a comment to support this issue/feature request.

After thrashing around with my code for some time, Googling the error message brought me here, and the hint "Mixed-determined means there might be an issue with initalisation constraints" was enough to get me through.

So, while the Dymola example would indeed be very useful, I think perhaps a simpler message like:
"The given system is mixed-determined. Initial conditions may be over-constrained..."
may be sufficient to point users in the right direction, and also be much more easily implemented.

Note: See TracTickets for help on using tickets.