m865.simulation
Class BalkEvent

java.lang.Object
  extended by m865.simulation.Event
      extended by m865.simulation.DepartmentStoreEvent
          extended by m865.simulation.BalkEvent
All Implemented Interfaces:
java.lang.Comparable, Prioritizeable

public class BalkEvent
extends DepartmentStoreEvent

The balk event might not occur. But if it does, it removes the passenger from the queue, updates passenger time record, and schedules a StartTaskEvent.


Field Summary
protected  BalkingQueue balkingQueue
          the balking queue in which the passenger that is now scheduled to balk is in.
protected  Passenger passenger
          the passenger that is now scheduled to balk.
 
Fields inherited from class m865.simulation.DepartmentStoreEvent
departmentStore
 
Fields inherited from class m865.simulation.Event
firingTime
 
Constructor Summary
BalkEvent(java.lang.Integer arrivalTime, DepartmentStore store, Passenger p, BalkingQueue q)
          Constructor for objects of class BalkEvent
 
Method Summary
 void fire()
          This method: removes the passenger from the queue.
 java.lang.String toString()
          Simple to string method to help with debugging.
 
Methods inherited from class m865.simulation.Event
adjustPriority, compareTo, getFiringTime, setFiringTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

passenger

protected Passenger passenger
the passenger that is now scheduled to balk.


balkingQueue

protected BalkingQueue balkingQueue
the balking queue in which the passenger that is now scheduled to balk is in.

Constructor Detail

BalkEvent

public BalkEvent(java.lang.Integer arrivalTime,
                 DepartmentStore store,
                 Passenger p,
                 BalkingQueue q)
Constructor for objects of class BalkEvent

Method Detail

fire

public void fire()
This method: removes the passenger from the queue. Updates Passenger Time Record. Schedules a StartTaskEvent.

Specified by:
fire in class Event

toString

public java.lang.String toString()
Simple to string method to help with debugging.

Overrides:
toString in class Event
Returns:
a string identifying this event.