View Javadoc
1   package org.opentrafficsim.road.gtu.generator.od;
2   
3   import org.opentrafficsim.core.gtu.GTUException;
4   import org.opentrafficsim.core.network.Node;
5   import org.opentrafficsim.road.gtu.generator.characteristics.LaneBasedGTUCharacteristics;
6   import org.opentrafficsim.road.gtu.strategical.od.Category;
7   
8   import nl.tudelft.simulation.jstats.streams.StreamInterface;
9   
10  /**
11   * Interface for classes that generate GTU characteristics based on an OD. Contrary to lower-level vehicle generation, the OD
12   * can pre-determine some information, such as GTU type and route.
13   * <p>
14   * Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
15   * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
16   * <p>
17   * @version $Revision$, $LastChangedDate$, by $Author$, initial version 9 dec. 2017 <br>
18   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
19   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
20   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
21   */
22  public interface GTUCharacteristicsGeneratorOD
23  {
24  
25      /**
26       * Generate new {@code LaneBasedGTUCharacteristics} using given input from OD.
27       * @param origin Node; origin
28       * @param destination Node; destination
29       * @param category Category; category (GTU type, route, or more)
30       * @param randomStream StreamInterface; stream for random numbers
31       * @return LaneBasedGTUCharacteristics
32       * @throws GTUException if characteristics could not be generated for the GTUException
33       */
34      LaneBasedGTUCharacteristics draw(Node origin, Node destination, Category category, StreamInterface randomStream)
35              throws GTUException;
36  
37  }