BARRE

TReX's Examples


The Lift Controller


BARRE

Description of the example

This example describes the interaction between the motor of a lift and one of its control panels. The two elements are modeled by extended finite-state machines and communicate through two counters (global integer variables). The following figure represents the behavior of the lift.

The global variable c stores at any time the current floor as the variable g stores the goal (the floor that the lift must reach). The motor waits for an order from the control part. This order should be up one floor (c := c+1) or down one floor (c := c-1). The order is represented by the variable a which is updated correctly according to the goal g searched by the control panel. After that, the control program compares the values of c and g until they are equal and finally chooses a new goal floor arbitrarily. The number of floors is parametrized by the parameter N.


Experimental results

We have analysed the system in two ways: The following table gives the memory consumed and the time spent for each system version. (We used a Sun Sparc 10 with 1Go of memory.)
Version Memory
(Mo)
Time
(s)
Reachable
Conf.
2
6.3 0.06 lift_2.scf
3 6.3 5.98 lift_3.scf
4 6.4 5.33 lift_4.scf
5 6.4 6.72 lift_5.scf
10 6.4 6.45 lift_10.scf
100 6.4 6.64 lift_100.scf
1000000 6.4 6.51 lift_1000000.scf
N 6.5 7.91 lift_infinite.scf


Back to TReX's Home Page