Opened 16 years ago
Last modified 14 years ago
#1057 closed defect (fixed)
Implementing else_when (from MathCore)
Reported by: | krsta | Owned by: | krsta |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | krsta, |
Description
Elsewhen should be implemented. Eg.g. the model below does not instantiate due to elsewhen statement.
model Square Real x(start=-1); Real y; Real z; Real q; Real w1,w2; equation when sample(2.5, 0.5) then x=-pre(x); q = x+1; end when; when sample(1.5, 0.5) then w1 = 4; w2 = 1.4; elsewhen sample(2.5, 0.5) then w1 = 1.2; w2 = 2; end when; y=if time < 2.5 then 0 else x; z = y; end Square;
Change History (2)
comment:1 Changed 15 years ago by brugard
comment:2 Changed 14 years ago by sjoelund.se
Works in trunk
Note: See
TracTickets for help on using
tickets.
http://intranet/trac/mathmodelica/ticket/1092