org.jscience.architecture.lift
Class SimplePassengerProcessor

java.lang.Object
  extended by org.jscience.architecture.lift.Tickable
      extended by org.jscience.architecture.lift.PassengerProcessor
          extended by org.jscience.architecture.lift.SimplePassengerProcessor
All Implemented Interfaces:
TickableInterface

public class SimplePassengerProcessor
extends PassengerProcessor

This file is licensed under the GNU Public Licens (GPL).
A simple PassengerProcessor that writes the travel and waiting times of passengers to a file. Obsoleted since JLESA contains logging.

See Also:
Passenger, PassengerGenerator

Constructor Summary
SimplePassengerProcessor(java.lang.String LogFileName)
          Constructor
 
Method Summary
 void created(Passenger P)
          This method is called by World after each new Passenger generated.
 java.lang.String getName()
          Returns the Name of the object.
 java.lang.String getVersion()
          Returns the Version of the object
 void prepareToDie()
          This method is called by World before this Passengerprocessor is terminated.
 void process(Passenger P)
          This method is called by World before each Passenger terminated.
 void Tick()
          This function is called in each step of the simulator.
 
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

SimplePassengerProcessor

public SimplePassengerProcessor(java.lang.String LogFileName)
Constructor

Method Detail

prepareToDie

public void prepareToDie()
Description copied from class: PassengerProcessor
This method is called by World before this Passengerprocessor is terminated. "As a reaction, the instance of this object class should move and/or duplicate all non-temporary information to persistent databases". In other worlds, it should save everything important to disk.

Specified by:
prepareToDie in class PassengerProcessor

getName

public java.lang.String getName()
Description copied from interface: TickableInterface
Returns the Name of the object.

Specified by:
getName in interface TickableInterface
Specified by:
getName in class PassengerProcessor
Returns:
DOCUMENT ME!

getVersion

public java.lang.String getVersion()
Description copied from interface: TickableInterface
Returns the Version of the object

Specified by:
getVersion in interface TickableInterface
Specified by:
getVersion in class PassengerProcessor
Returns:
DOCUMENT ME!

Tick

public void Tick()
Description copied from interface: TickableInterface
This function is called in each step of the simulator. In other words, this method is called whenever a discrete simulation step (0.1 second) happens. All objects that are time-variant is notified by this method that some time has elapsed since.

Specified by:
Tick in interface TickableInterface
Specified by:
Tick in class Tickable

created

public void created(Passenger P)
Description copied from class: PassengerProcessor
This method is called by World after each new Passenger generated.

Specified by:
created in class PassengerProcessor
Parameters:
P - DOCUMENT ME!

process

public void process(Passenger P)
Description copied from class: PassengerProcessor
This method is called by World before each Passenger terminated.

Specified by:
process in class PassengerProcessor
Parameters:
P - DOCUMENT ME!