|
|||||||||
| 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.PassengerGenerator
org.jscience.architecture.lift.PoissonPassengerGenerator
public class PoissonPassengerGenerator
This file is licensed under the GNU Public Licens (GPL).
This is a fairly simple PassengerGenerator that beheaves like a
handful of Poisson-distributions. It actually uses pseudorandom numbers to
generate a new Passenger. In every Tick for each floor X, a
new Passenger from floor X to a random non-X floor
is generated if and only if Gammas[X]>=PR where PR is the
latest pseudorandom number. The pseudorandom number generator can be
initialized to a specific value through RandomSeed.
| Field Summary |
|---|
| Fields inherited from class org.jscience.architecture.lift.PassengerGenerator |
|---|
Passengers |
| Constructor Summary | |
|---|---|
PoissonPassengerGenerator()
Calls PoissonPassengerGenerator(newdouble[World.getNoF()]). |
|
PoissonPassengerGenerator(double[] GammaValues)
Constructs a new PoissonPassengerGenerator using the GammaValues to
initialize the Gammas mentioned in the class descripiton. |
|
PoissonPassengerGenerator(double[] GammaValues,
long RandomSeed)
Constructs a new PoissonPassengerGenerator using the GammaValues to
initialize the Gammas and RandomSeed to initialize the pseudorandom number
generator mentioned in the class descripiton. |
|
PoissonPassengerGenerator(long RandomSeed)
Calls PoissonPassengerGenerator(newdouble[World.getNoF()], RandomSeed). |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
Returns the Name of the object. |
java.lang.String |
getVersion()
Returns the Version of the object |
void |
setGamma(int AbsFloor,
double NewGamma)
Sets the Gamma of the AbsFloorth floor to NewGamma. |
void |
Tick()
This function is called in each step of the simulator. |
| Methods inherited from class org.jscience.architecture.lift.PassengerGenerator |
|---|
getGeneratedPassengers |
| 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 |
| Constructor Detail |
|---|
public PoissonPassengerGenerator()
PoissonPassengerGenerator(newdouble[World.getNoF()]).
public PoissonPassengerGenerator(long RandomSeed)
PoissonPassengerGenerator(newdouble[World.getNoF()], RandomSeed).
public PoissonPassengerGenerator(double[] GammaValues)
PoissonPassengerGenerator using the GammaValues to
initialize the Gammas mentioned in the class descripiton.
public PoissonPassengerGenerator(double[] GammaValues,
long RandomSeed)
PoissonPassengerGenerator using the GammaValues to
initialize the Gammas and RandomSeed to initialize the pseudorandom number
generator mentioned in the class descripiton.
| Method Detail |
|---|
public void Tick()
TickableInterface
Tick in interface TickableInterfaceTick in class Tickablepublic java.lang.String getName()
TickableInterface
getName in interface TickableInterfacegetName in class PassengerGeneratorpublic java.lang.String getVersion()
TickableInterface
getVersion in interface TickableInterfacegetVersion in class Tickable
public void setGamma(int AbsFloor,
double NewGamma)
AbsFloorth floor to NewGamma.
AbsFloor - DOCUMENT ME!NewGamma - DOCUMENT ME!
java.lang.RuntimeException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||