12345678910111213141516171819202122232425 |
- import PowerWindowModel
- import Controller_SA
- // this one could be joined with the one below, if we assume certain priorities in executing the rules
- semantic adaptation WindowSA window_sa
- at "./path/to/WindowSA.fmu"
- for fmu window
- out rules {
- true -> { } --> { reaction_torque := -reaction_torque; };
- }
- // algebraic loop, simply use delay... written in baseDSL
- semantic adaptation WindowSADelay window_sa_delay //with master
- at "./path/to/WindowSADelay.fmu"
- for fmu window_sa // inner SA, makes it possible to enforce order among adaptations this way
- param init_height := 0;
- param init_reaction_torque := 0;
- out var stored_height := init_height;
- out var stored_reaction_torque := init_reaction_torque;
- out rules {
- true -> { var temp_height := height; height := stored_height; stored_height := temp_height; } --> { };
- true -> { var temp_reaction_torque := reaction_torque; reaction_torque := stored_reaction_torque; stored_reaction_torque := temp_reaction_torque; } --> { };
- }
|