|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.lift.Tickable
org.jscience.architecture.lift.World
public class World
This file is licensed under the GNU Public Licens (GPL).
This foundation class is the World that contains almost everything
else. GUIs are not part of the World so that JLESA can work
in a command-line.
| Field Summary | |
|---|---|
static int |
MaximumNumberOfTicks
Maximum number of Ticks before stopping. |
| Constructor Summary | |
|---|---|
World(int MinFloor,
int MaxFloor)
Constructor a new World, with (NewMinFloor,MaxFloorm-1) |
|
World(int MinFloor,
int MaxFloor,
int ConfigFileID)
Constructor a new World. |
|
| Method Summary | |
|---|---|
void |
add(Car TC)
Adds the TCCar to the World. |
static void |
add(Passenger TP)
Adds the TPPassenger to the World. |
void |
add(PassengerGenerator PG)
Adds the PGPassengerGenerator to the World. |
void |
add(PassengerProcessor PP)
Adds the PPPassengerProcessor to the World. |
static void |
deleteCorrespongingCalls(Car C)
Deletes all calls that are available on CCar's
indicator. |
static CA |
getCA()
Returns the current CA. |
static Car |
getCar(int Index)
Returns the Indexth Car. |
static Car[] |
getCars()
Returns all Cars in an Array. |
static int |
getIndexOfCar(Car C)
Returns the Index of the CCar. |
static InOutput |
getInput(int Index)
Returns the Indexth Input ( which is really a
InOutput). |
static InOutput[] |
getInputs()
Returns all the Inputs ( which are really InOutputs). |
static java.util.logging.Logger |
getLogger()
Returns the Logger of the World |
static int |
getMaxF()
Returns the highest floor |
static int |
getMinF()
Returns the lowest floor |
java.lang.String |
getName()
Returns the Name of the object. |
static int |
getNoC()
Returns the number of Cars. |
static int |
getNoF()
Returns the number of floors. |
static int |
getNumberOfPassengers(int Floor)
Returns the number of Passengers on floor Floor. |
static InOutput[] |
getOutputs(int AbsFloor)
Returns all the Outputs (which are really InOutputs) on the AbsFloorth floor |
static int[] |
getPassengerDstFloorsInCar(Car C)
Returns the destination floors of the Passengers in
CarC |
static java.util.ArrayList |
getPassengers(int Floor)
Returns the Passengers on floor Floor. |
static java.util.ArrayList |
getPassengersGettingOutAtFloor(int AbsFloor)
Returns the Passengers getting out on floor Floor. |
static java.util.ArrayList |
getPassengersInCar(Car C)
Returns the Passengers in CarC. |
static int |
getTotalTicks()
Returns the total number of ticks so long. |
java.lang.String |
getVersion()
Returns the Version of the object |
static boolean |
isBlocked(Car C)
Returns true if the CCar is blocked (due
to Passengers). |
static void |
letPassengersToSignal()
Lets the Passengers signal. |
static void |
remove(Passenger TP)
Removes the finished TPPassenger from the World after processing it through all added PassengerProcessors. |
protected void |
setCA(CA NewCA)
Sets the World's CA to NewCA. |
void |
Tick()
This function is called in each step of the simulator. |
boolean |
Tick(int TN)
Equivalent of TN pieces of Tick() |
static int |
toAbsFloor(int RelFloor)
Converts RelFloor to AbsFloor |
static int |
toRelFloor(int AbsFloor)
Converts AbsFloor to RelFloor |
| Methods inherited from class org.jscience.architecture.lift.Tickable |
|---|
getFullName, getID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int MaximumNumberOfTicks
| Constructor Detail |
|---|
public World(int MinFloor,
int MaxFloor)
World, with (NewMinFloor,MaxFloorm-1)
public World(int MinFloor,
int MaxFloor,
int ConfigFileID)
World.
MinFloor - Lowest floorMaxFloor - Highest floorConfigFileID - The ID of the translation/config file to use| Method Detail |
|---|
public static boolean isBlocked(Car C)
true if the CCar is blocked (due
to Passengers).
C - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public static CA getCA()
CA.
public static Car getCar(int Index)
Indexth Car.
Index - DOCUMENT ME!
public static Car[] getCars()
Cars in an Array.
public static int getIndexOfCar(Car C)
Index of the CCar.
C - DOCUMENT ME!
public static InOutput getInput(int Index)
Indexth Input ( which is really a
InOutput).
Index - DOCUMENT ME!
public static InOutput[] getInputs()
Inputs ( which are really InOutputs).
public static java.util.logging.Logger getLogger()
Logger of the World
public static int getMaxF()
public static int getMinF()
public java.lang.String getName()
TickableInterface
getName in interface TickableInterfacegetName in class Tickablepublic static int getNoC()
Cars.
public static int getNoF()
public static int getNumberOfPassengers(int Floor)
Passengers on floor Floor.
Floor - DOCUMENT ME!
public static InOutput[] getOutputs(int AbsFloor)
Outputs (which are really InOutputs) on the AbsFloorth floor
AbsFloor - DOCUMENT ME!
public static int[] getPassengerDstFloorsInCar(Car C)
Passengers in
CarC
C - DOCUMENT ME!
public static java.util.ArrayList getPassengers(int Floor)
Passengers on floor Floor.
Floor - DOCUMENT ME!
public static java.util.ArrayList getPassengersGettingOutAtFloor(int AbsFloor)
Passengers getting out on floor Floor.
AbsFloor - DOCUMENT ME!
public static java.util.ArrayList getPassengersInCar(Car C)
Passengers in CarC.
C - DOCUMENT ME!
public static int getTotalTicks()
public java.lang.String getVersion()
TickableInterface
getVersion in interface TickableInterfacegetVersion in class Tickablepublic void Tick()
TickableInterface
Tick in interface TickableInterfaceTick in class Tickablepublic boolean Tick(int TN)
TN pieces of Tick()
TN - DOCUMENT ME!
public static void add(Passenger TP)
TPPassenger to the World.
TP - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public void add(Car TC)
TCCar to the World.
TC - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public void add(PassengerGenerator PG)
PGPassengerGenerator to the World.
PG - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public void add(PassengerProcessor PP)
PPPassengerProcessor to the World.
PP - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public static void deleteCorrespongingCalls(Car C)
CCar's
indicator. This usually happens when a Car arrives to a floor.
C - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public static void letPassengersToSignal()
Passengers signal.
public static void remove(Passenger TP)
TPPassenger from the World after processing it through all added PassengerProcessors.
TP - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!public static int toAbsFloor(int RelFloor)
RelFloor to AbsFloor
RelFloor - DOCUMENT ME!
public static int toRelFloor(int AbsFloor)
AbsFloor to RelFloor
AbsFloor - DOCUMENT ME!
protected void setCA(CA NewCA)
World's CA to NewCA.
NewCA - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||