Interface HubWorkerListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
HubWorkerAdapter

public interface HubWorkerListener extends EventListener
Data listener class for hub workers. This class is used for instrumenting a simulation. It tracks a hub worker's location (which hub it is at), the hub worker's bicycle count, and the hub worker's activities.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changedCount(HubWorker worker, double time, long ticks, Hub hub, int oldcount, int newcount)
    Indicate that a worker's bicycle count changed.
    void
    dequeued(HubWorker worker, double time, long ticks, Hub hub)
    Indicate that a worker left a storage-hub queue.
    void
    enteredHub(HubWorker worker, double time, long ticks, Hub hub)
    Indicate that a worker entered a hub.
    void
    fixingOverflows(HubWorker worker, double time, long ticks, Hub hub)
    Indicated that a worker started to remove bicycles from the overflow area.
    void
    fixingPreferred(HubWorker worker, double time, long ticks, Hub hub)
    Indicate that a worker started to handle the preferred area.
    void
    leftHub(HubWorker worker, double time, long ticks, Hub hub)
    Indicate that a worker left a hub.
    void
    queued(HubWorker worker, double time, long ticks, Hub hub)
    Indicate that a worker joined a queue.
  • Method Details

    • dequeued

      void dequeued(HubWorker worker, double time, long ticks, Hub hub)
      Indicate that a worker left a storage-hub queue.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
    • enteredHub

      void enteredHub(HubWorker worker, double time, long ticks, Hub hub)
      Indicate that a worker entered a hub.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
    • fixingOverflows

      void fixingOverflows(HubWorker worker, double time, long ticks, Hub hub)
      Indicated that a worker started to remove bicycles from the overflow area.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
    • fixingPreferred

      void fixingPreferred(HubWorker worker, double time, long ticks, Hub hub)
      Indicate that a worker started to handle the preferred area.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
    • leftHub

      void leftHub(HubWorker worker, double time, long ticks, Hub hub)
      Indicate that a worker left a hub.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
    • queued

      void queued(HubWorker worker, double time, long ticks, Hub hub)
      Indicate that a worker joined a queue.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
    • changedCount

      void changedCount(HubWorker worker, double time, long ticks, Hub hub, int oldcount, int newcount)
      Indicate that a worker's bicycle count changed.
      Parameters:
      worker - the hub worker being tracked
      time - the simulation time in double-precision units
      ticks - the simulation time in ticks
      hub - the hub at which this event occurred
      oldcount - the bicycle count before the change
      newcount - the bicycle count after the change