|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface KinematicModel
This file is licensed under the GNU Public Licens (GPL).
This interface describes a Kinematic Model. A Kinematic Model is a
mathematical model used to kinematically (mechanically) model an elevator
car and it's movement in the shaft.
| Method Summary | |
|---|---|
void |
dstFChanged(Car C)
Notifies the Kinematic Model that the destination floor of the moving Car
has changed. |
int |
getDoorCloseTime(int AbsFloor,
Car C)
Returns the time (in Ticks) needed to close the door of the Car C on
the AbsFloorth Floor. |
int |
getDoorOpenTime(int AbsFloor,
Car C)
Returns the time (in Ticks) needed to open the door of the Car C on
the AbsFloorth Floor. |
double |
getProgress(Car C)
Gets the Progress of a Car in the [0, 1] interval. |
boolean |
mayStopAt(Car C,
int AbsFloor)
This method is used to determinate if the Car C may stop on floor
AbsFloor before its next planned stop without reversing its direction. |
void |
tick(SimulatedCar C)
Cars inherit void Tick() from the Tickable interface and
call this function each time their Tick() method is called. |
| Method Detail |
|---|
void tick(SimulatedCar C)
Cars inherit void Tick() from the Tickable interface and
call this function each time their Tick() method is called. Before calling,
the Car increasess it's Progress by one. This happens in every
Tick(), namely in every 0.1 second, so this method is called for each Car
in every 0.1 second of simulation time.C.arrived() if the C Car arrives at it's planned
destination Floor.C.CrtFReached() if the C Car is reached the next floor
while moving
C - The Car which called this method.
boolean mayStopAt(Car C,
int AbsFloor)
Car C may stop on floor
AbsFloor before its next planned stop without reversing its direction.
This occures when a moving Car needs to determine if it may accept a new
call between its current floor and planned destination floor.
void dstFChanged(Car C)
Car
has changed. This usually happens when a Car catches a call that appears
after it's start.
C - The Car which changed its destination floordouble getProgress(Car C)
Progress of a Car in the [0, 1] interval. This is only
applicable if the doors are closing or opening or if the Car is moving from
one floor to another. This should be 0.25 if the door is only 25 percent open, 0.66
if the car already moved 66% of the distance between two adjacent floors, and so on.
C - The target Car
0<=Progress<=1 value
int getDoorOpenTime(int AbsFloor,
Car C)
Car C on
the AbsFloorth Floor.
int getDoorCloseTime(int AbsFloor,
Car C)
Car C on
the AbsFloorth Floor.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||