Accumulating an amount in a cycleOther examplesA lift simulation example

Contents

Index

A lift simulation example

In this example we simulate a lift: from the state Wait, a floor where to go is specified as a parameter of the Goal gate.
Then, from the Moving state, the lift goes up or down, stopping when the goal is reached.
The test purpose TP2 selects the following scenario: the lift will stop at a level just below the middle floor.
Here are the specification and test purpose graphs, and finally the resulting test case
The interesting point is that from state Wait_S1 to Moving_S1, the guard constraints the value of p (the floor number to reach) to be less than the half of max (the max number of floors).
The test purpose TP5 is a variant of the previous scenario in which the lift is supposed to stop at a first level L1 and then to go down to a second one L2 such that L2 is L1/2 and L2 is under max/3. The resulting test case shows that the inferred constrainst on L1 is that L1 should be less than 2*max/3.


F Ployette, F-X Ponscarme, October 17, 2007


Accumulating an amount in a cycleOther examplesA lift simulation exampleContentsIndex