m865.simulation
Class BalkEvent
java.lang.Object
m865.simulation.Event
m865.simulation.DepartmentStoreEvent
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
BalkEvent
public BalkEvent(java.lang.Integer arrivalTime,
DepartmentStore store,
Passenger p,
BalkingQueue q)
- Constructor for objects of class BalkEvent
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.