|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.lift.LoadDependentKinematicModel
public class LoadDependentKinematicModel
This file is licensed under the GNU Public Licens (GPL).
This is a fairly simple implementation of a load-dependend KinematicModel. The time needed to reach Floor #I from Floor #J is (the difference of I and J is K) is
BaseTime+KFloorFligthTime, where BaseTime and FloorFlightTime may depend on the number of Passengers in the
Car.
LoadSpeed| Constructor Summary | |
|---|---|
LoadDependentKinematicModel(LoadSpeed[] Config)
Constructor |
|
| 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. |
int |
getLoadTablesLength()
DOCUMENT ME! |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoadDependentKinematicModel(LoadSpeed[] Config)
Config - Configuration tables in the form of a LoadSpeed array.| Method Detail |
|---|
public int getLoadTablesLength()
public int getDoorCloseTime(int AbsFloor,
Car C)
KinematicModelCar C on
the AbsFloorth Floor.
getDoorCloseTime in interface KinematicModel
public int getDoorOpenTime(int AbsFloor,
Car C)
KinematicModelCar C on
the AbsFloorth Floor.
getDoorOpenTime in interface KinematicModelpublic double getProgress(Car C)
KinematicModelProgress 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.
getProgress in interface KinematicModelC - The target Car
0<=Progress<=1 valuepublic void dstFChanged(Car C)
KinematicModelCar
has changed. This usually happens when a Car catches a call that appears
after it's start.
dstFChanged in interface KinematicModelC - The Car which changed its destination floor
public boolean mayStopAt(Car C,
int AbsFloor)
KinematicModelCar 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.
mayStopAt in interface KinematicModelpublic void tick(SimulatedCar C)
KinematicModelCars 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
tick in interface KinematicModelC - The Car which called this method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||