Class QueueEntry<E>

java.lang.Object
nl.tudelft.simulation.dsol.demo.des.mm1.step2.QueueEntry<E>
Type Parameters:
E - the entity type in the queue

public class QueueEntry<E> extends Object
The QueueEntry class for the M/M/1 Discrete Event Simulation (DES) model example that stores waiting Entity instances. The WueueEntry class stores an entity plus the time when the entity entered the queue, so we can calculate waiting times. See DES Model Example for more information.

Copyright (c) 2023-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Alexander Verbraeck
  • Constructor Details

    • QueueEntry

      public QueueEntry(E entity, double queueInTime)
      A combination of an entity and a time when the entity entered the queue.
      Parameters:
      entity - E; the entity to insert in the queue
      queueInTime - double; the time it gets into the queue
  • Method Details

    • getQueueInTime

      public double getQueueInTime()
      Return the time when the entity entered the queue.
      Returns:
      double; the time when the entity entered the queue.
    • getEntity

      public E getEntity()
      Return the entity that is in the queue.
      Returns:
      E; the entity that is in the queue
    • toString

      public String toString()
      Overrides:
      toString in class Object