Opened 12 years ago

Last modified 10 years ago

#1932 accepted enhancement

Redesign When Equation Implementation in Backend

Reported by: Jens Frenkel Owned by: Willi Braun
Priority: low Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: Jens Frenkel

Description (last modified by Willi Braun)

The current implementation for when equations does not consider the MSL3.2 requirements in an efficient way.

cr = ...
(cr,cr,..) = ...

For example the following when

when cond then

(cr1,cr2) = func(...)

elsewhen cond1 then

cr1 = exp;
cr2 = exp;

end when;

should be legal modelica but its not efficient supported.

Change History (4)

comment:1 by Willi Braun, 12 years ago

Description: modified (diff)
Priority: highlow
Status: newaccepted

Which MSL3.2 Model does use such construct?
As far as I can see in the whole library MSL32 contains
only 3 times "elsewhen"

Modelica$ grep "elsewhen" * -R -n | grep -P '^(?!.*.svn).*$'
Blocks/MathBoolean.mo:416:        elsewhen not u then
Electrical/Digital.mo:3086:          elsewhen time >= t_next then
Electrical/Digital.mo:3158:         elsewhen time >= t_next then

and they occurs only in algorithms, which are supported correctly
Additional, as far as I know even Dymola does not not support
"elsewhen" in equations at least till version 2012.

However, I agree we should redesign the processing of when equations in
the Backend and consider such constructs therefoer,
but maybe that has no priority right now.

comment:2 by Martin Sjölund, 11 years ago

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:3 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:4 by Willi Braun, 10 years ago

Milestone: 1.9.2Future
Note: See TracTickets for help on using tickets.