Opened 13 years ago

Last modified 11 years ago

#1932 accepted enhancement

Redesign When Equation Implementation in Backend — at Version 1

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 (1)

comment:1 by Willi Braun, 13 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.

Note: See TracTickets for help on using tickets.