Commit c30ebad
New Modelica state machine prototype
- Added DAE.FLAT_SM and DAE.SM_COMP to capture state machine
composition
- Most of the code for state machine instantiation is in the new
package "InstStateMachineUtil.mo"
- Transformation from state machines to data-flow is now triggered
within the front-end function
DAEUtil.transformationsBeforeBackend(..)
- The state machine to data-flow transformation code is in the new
package "StateMachineFlatten.mo"
(stateMachineFlatten.stateMachineToDataFlow(..))
- The old back-end prototype in package "StateMachineFeatures.mo"
is now obsolete
Remaining issues:
- Not yet implemented operators "ticksInState()" and "timeInState()"
and MLS "17.3.6 Merging Connections to Multiple Outputs"
- Equations in states need to confirm to the same requirements as
when-equations (component ref to be assigned to must be at the LHS)
- State machines are based on the synchronous elements features and
in order simulate state-machines requires these to be working in OM
- As a current workaround to simulate state machines is is possible
to uncomment code that wraps all equations in "when-equations" and
replaces "previous(x)" by "pre(x)", however, this is only intended
for development purposes
- The functionality provided by "StateMachineFlatten.mo" should be
better adapted to a back-end implementation, however this will
require to adapt the data structures used in the back-end
(future work)1 parent e8d65ec commit c30ebad
File tree
16 files changed
+2774
-175
lines changed- Compiler
- BackEnd
- FrontEnd
- Template
- Util
- boot
16 files changed
+2774
-175
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
174 | 185 | | |
175 | 186 | | |
176 | 187 | | |
| |||
277 | 288 | | |
278 | 289 | | |
279 | 290 | | |
280 | | - | |
| 291 | + | |
281 | 292 | | |
282 | 293 | | |
283 | 294 | | |
| |||
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
316 | | - | |
| 327 | + | |
317 | 328 | | |
318 | 329 | | |
319 | 330 | | |
| |||
2440 | 2451 | | |
2441 | 2452 | | |
2442 | 2453 | | |
| 2454 | + | |
2443 | 2455 | | |
2444 | 2456 | | |
2445 | 2457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
340 | 351 | | |
341 | 352 | | |
342 | 353 | | |
| |||
1031 | 1042 | | |
1032 | 1043 | | |
1033 | 1044 | | |
1034 | | - | |
1035 | 1045 | | |
1036 | 1046 | | |
1037 | 1047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
2170 | 2171 | | |
2171 | 2172 | | |
2172 | 2173 | | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
2173 | 2192 | | |
2174 | 2193 | | |
2175 | 2194 | | |
| |||
2620 | 2639 | | |
2621 | 2640 | | |
2622 | 2641 | | |
| 2642 | + | |
2623 | 2643 | | |
2624 | 2644 | | |
2625 | 2645 | | |
2626 | 2646 | | |
2627 | 2647 | | |
2628 | 2648 | | |
2629 | 2649 | | |
2630 | | - | |
2631 | | - | |
2632 | | - | |
2633 | | - | |
2634 | | - | |
| 2650 | + | |
| 2651 | + | |
2635 | 2652 | | |
2636 | | - | |
2637 | 2653 | | |
2638 | 2654 | | |
2639 | 2655 | | |
| |||
0 commit comments