|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.lift.ca.SimpleALLCA
public class SimpleALLCA
This file is licensed under the GNU Public Licens (GPL).
This is SimpleALLCA that controls a Car
| Field Summary | |
|---|---|
static short |
BOTH_WAY
Description of the Field |
protected short |
Direction
DOCUMENT ME! |
static short |
DOWN_WAY
Description of the Field |
static short |
UP_WAY
Description of the Field |
| Constructor Summary | |
|---|---|
SimpleALLCA(Car MyCar,
int MyParkLevel,
int MyParkTimeOut,
int MyDoorOpenTimeOut)
Constructor |
|
| Method Summary | |
|---|---|
short |
decideDirection(boolean[] UpCalls,
boolean[] DownCalls)
Decides the direction in which MyCar should go. |
short |
getDirection()
Returns the current Direction |
int |
getNextStop()
Returns the next scheduled floor to stop on |
boolean |
goes(int From,
int To,
boolean[] UpCalls,
boolean[] DownCalls)
CA |
void |
issueCommand(int AbsFloor)
Issues a command to MyCar to floor AbsFloor |
int |
nextStop(boolean[] UpCalls,
boolean[] DownCalls)
Returns the next scheduled floor to stop on, depending upon the UpCalls and DownCalls |
void |
tick(boolean[] UpCalls,
boolean[] DownCalls)
This is the tick() that is called by a CA. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final short BOTH_WAY
public static final short DOWN_WAY
public static final short UP_WAY
protected short Direction
| Constructor Detail |
|---|
public SimpleALLCA(Car MyCar,
int MyParkLevel,
int MyParkTimeOut,
int MyDoorOpenTimeOut)
MyCar - The Car controlled by this SimpleALLCAMyParkLevel - The level on which MyCar should parkMyParkTimeOut - After this many ticks, SimpleALLCA will park MyCarMyDoorOpenTimeOut - After this many ticks, SimpleALLCA will close MyCar's door| Method Detail |
|---|
public short decideDirection(boolean[] UpCalls,
boolean[] DownCalls)
MyCar should go.
UpCalls - The UP-calls allocated to this SimpleALLCADownCalls - The DOWN-calls allocated to this SimpleALLCA
Direction
java.lang.RuntimeException - DOCUMENT ME!public short getDirection()
Direction
public int getNextStop()
public boolean goes(int From,
int To,
boolean[] UpCalls,
boolean[] DownCalls)
CA
From - DOCUMENT ME!To - DOCUMENT ME!UpCalls - DOCUMENT ME!DownCalls - DOCUMENT ME!
public void issueCommand(int AbsFloor)
MyCar to floor AbsFloor
AbsFloor - DOCUMENT ME!
public int nextStop(boolean[] UpCalls,
boolean[] DownCalls)
UpCalls and DownCalls
UpCalls - DOCUMENT ME!DownCalls - DOCUMENT ME!
public void tick(boolean[] UpCalls,
boolean[] DownCalls)
tick() that is called by a CA.
UpCalls - The up calls that are planned to be served by this car.DownCalls - The down calls that are planned to be served by this
car.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||