Opened 5 years ago

Last modified 3 years ago

#5705 new defect

Simplifications of boolean variables in initialization problems

Reported by: Francesco Casella Owned by: Karim Adbdelhak
Priority: high Milestone:
Component: Backend Version:
Keywords: Cc: Andreas Heuermann, Andrea Bartolini

Description

We have a tough use case of a hydraulic circuit with homotopy-based initialization. The system is driven by a boolean variable.

In the base case, the boolean variable is set to false by an equation,

...
  Boolean cmd;
equation
  cmd = false;
...

and the initialization problem is solved successfully. If we set up simulations where the initial value of the boolean variable is false, but then it is later switched to true

... 
  Boolean cmd(final start = false, final fixed = true);
equation
  when time > 500 then
    cmd = true;
  end when;

or

...
   Boolean cmd;
initial equation
   cmd = false;
equation
...
  when time > 500 then
    cmd = true;
  end when;
...

then the initialization fails.

IMHO the initialization problem should have exactly the same structure in the three cases. Why doesn't it?

Change History (3)

comment:1 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:2 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:3 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.