|
@@ -28,9 +28,10 @@ obstacle.reaction_force -> window_sa.reaction_force;
|
|
|
|
|
|
/*
|
|
|
Declares the external ports of the semantic adaptation
|
|
|
+Notice that window_sa.displacement is a dangling input port, so an extra input port will exist in the adapted FMU.
|
|
|
*/
|
|
|
-input ports displacement, speed;
|
|
|
-output ports tau;
|
|
|
+input ports speed -> window_sa.speed;
|
|
|
+output ports tau <- obstacle.tau;
|
|
|
|
|
|
control var previous_speed := 0;
|
|
|
control var future_speed := 0;
|
|
@@ -54,9 +55,6 @@ in rules {
|
|
|
dt - In the control rules block, (t + dt) is the time that will be passed to the doStep function of the inner FMU. In the control rules block, this can be computed by doing dt := inner_time - t.
|
|
|
h - this is the communication step size that will be sent to the inner FMU.
|
|
|
|
|
|
- As previously described, the displacement input port is taken care of automatically by the declaration "displacement -> displacement" in the input ports.
|
|
|
- So the declaration would be equivalent to having this intruction in this block.
|
|
|
- displacement := displacement;
|
|
|
*/
|
|
|
window_sa.speed := previous_speed + (future_speed - previous_speed)*dt;
|
|
|
}
|