View Javadoc
1   package nl.tudelft.simulation.examples.dsol.terminal;
2   
3   import nl.tudelft.simulation.dsol.simulators.DevsSimulatorInterface;
4   import nl.tudelft.simulation.jstats.distributions.DistContinuous;
5   
6   /**
7    * The QCs modeled as resources.
8    * <p>
9    * Copyright (c) 2002-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
10   * for project information <a href="https://simulation.tudelft.nl/" target="_blank"> https://simulation.tudelft.nl</a>. The DSOL
11   * project is distributed under a three-clause BSD-style license, which can be found at
12   * <a href="https://https://simulation.tudelft.nl/dsol/docs/latest/license.html" target="_blank">
13   * https://https://simulation.tudelft.nl/dsol/docs/latest/license.html</a>.
14   * </p>
15   * @author <a href="https://www.linkedin.com/in/peterhmjacobs">Peter Jacobs</a>
16   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
17   */
18  public class QuayCrane extends IntResource<Double>
19  {
20      /** */
21      private static final long serialVersionUID = 1L;
22  
23      /** QC time delay. */
24      private final DistContinuous qcTime;
25  
26      /**
27       * @param simulator DevsSimulatorInterface&lt;Double&gt;; the simulator
28       * @param description String; the description
29       * @param capacity long; the capacity
30       * @param qcTime DistContinuous; QC time delay
31       */
32      public QuayCrane(final DevsSimulatorInterface<Double> simulator, final String description, final long capacity,
33              final DistContinuous qcTime)
34      {
35          super(simulator, description, capacity);
36          this.qcTime = qcTime;
37      }
38  
39      /**
40       * @return the QC handling time
41       */
42      public double drawDelay()
43      {
44          return this.qcTime.draw();
45      }
46  }