Ticket #37 (closed defect: invalid)
Clarify execution order of statements in an algorithm
| Reported by: | mauss | Owned by: | otter |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | --Modelica Specification-- | Version: | 3.0 |
| Severity: | Keywords: | ||
| Cc: | Hide ticket: |
Description (last modified by dietmarw) (diff)
The following model contains an algorithm with three
statements a,b,c. These seem to be executed in the
order a,c,b, which I find not completely obvious when
reading the specification.
model A Real x; Real y; algorithm when time>0.5 then x := 1; end when; y := x; when time>0.5 then x := 2; end when; end A;
When running this, y jumps from 0 to 2 at time=0.5,
not from 0 to 1 as one might expect.
Dynasim confirmed that this is the intended behaviour.
Proposal: In section 11.2.7 of the Modelica Spec 3.0,
clarify that all activated when statements of an algorithm
section are executed in their order of occurrence in the
algorithm section, but BEFORE all other statements
of the algorithm section.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
