Browse Source

changed direction of output ports bind (i think this is what we've agreed)

Cláudio Gomes 4 years ago

+ 3 - 5

@@ -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;

+ 1 - 1

@@ -60,7 +60,7 @@ Declares two output ports, and specified how height is mapped to disp.
 Here, the units need to be specified, so that the conversion can take place.
 The units of disp can be either obtained from the scenario, or specified explicitly here.
-output ports height(m) -> disp(cm), tau; 
+output ports disp(cm) <- height(m), tau; 
 There are alternative ways that this can be interpreted:
 disp  := arbitrary_function(height) * 100 or arbitrary_function(height * 100) (they are not necessarily equal)