## org.jscience.architecture.lift Interface KinematicModel

All Known Implementing Classes:

`public interface KinematicModel`

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 `AbsFloor`th Floor.
` int` ```getDoorOpenTime(int AbsFloor, Car C)```
Returns the time (in Ticks) needed to open the door of the `Car` C on the `AbsFloor`th 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)`
`Car`s inherit `void Tick()` from the `Tickable` interface and call this function each time their `Tick()` method is called.

Method Detail

### tick

`void tick(SimulatedCar C)`
`Car`s 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.
It must call `C.arrived()` if the C `Car` arrives at it's planned destination Floor.
It must call `C.CrtFReached()` if the C `Car` is reached the next floor while moving

Parameters:
`C` - The `Car` which called this method.

### mayStopAt

```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. This occures when a moving `Car` needs to determine if it may accept a new call between its current floor and planned destination floor.

### dstFChanged

`void dstFChanged(Car C)`
Notifies the Kinematic Model that the destination floor of the moving `Car` has changed. This usually happens when a `Car` catches a call that appears after it's start.

Parameters:
`C` - The Car which changed its destination floor

### getProgress

`double getProgress(Car C)`
Gets the `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.

Parameters:
`C` - The target `Car`
Returns:
The `0<=Progress<=1` value

### getDoorOpenTime

```int getDoorOpenTime(int AbsFloor,
Car C)```
Returns the time (in Ticks) needed to open the door of the `Car` C on the `AbsFloor`th Floor.

### getDoorCloseTime

```int getDoorCloseTime(int AbsFloor,
Car C)```
Returns the time (in Ticks) needed to close the door of the `Car` C on the `AbsFloor`th Floor.