|
Model variables can be collected into mobile components that can be exchanged between basic components.
By means of mobile components, all kinds of portable logistic units may be modelled, like passengers, goods in transit, vehicles and cargo boxes, but also information units like data packets or orders.
Examples:
MOBILE COMPONENT Passenger
DECLARATION OF ELEMENTS
CONSTANTS Age (INT) := 25,
STATE VARIABLES
Destination (INT) := 10
END OF Passenger
MOBILE COMPONENT Bus
DECLARATION OF ELEMENTS
STATE VARIABLES
TArrive (REAL) := 0,
TDepart (REAL) := 0
END OF Bus
|
|
Every mobile component has a domicile, called location. On each location may stay several mobile components at the same time. Because locations often represent waiting queues, they are organized accordingly.
Example:
LOCATIONS
BusStop (Passenger)
:= 2 Passenger,
Road (Bus ORDERED BY INC TArrive)
:= 0 Bus,
BusLane (Bus ORDERED BY INC TDepart)
:= 0 Bus
Passengers arriving at the bus stop are ordered by the time they arrive. Buses on the road to the bus stop are sorted by their arrival times, buses at the bus stop by their departure times. The buses leaving next therefore build the tip of the waiting queue.
The mobile components on a location are accessed through their slot position within the waiting queue.
Example:
BusStop:Passenger[1].TArrive^ := T;
The attribute TArrive of the first passenger at the bus stop gets the value T.
|