1 package org.opentrafficsim.road.gtu.lane;
2
3 import org.opentrafficsim.core.distributions.ProbabilityException;
4 import org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface;
5 import org.opentrafficsim.core.gtu.GTUException;
6 import org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException;
7
8 /**
9 * Interface for objects that can generate a LaneBasedGTUCharacteristics object.
10 * <p>
11 * Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12 * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
13 * <p>
14 * @version $Revision$, $LastChangedDate$, by $Author$, initial version Mar 9, 2016 <br>
15 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
16 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
17 */
18 public interface LaneBasedGTUCharacteristicsGenerator
19 {
20 /**
21 * Generate a LaneBasedGTUCharacteristics object.
22 * @param gtu GTU
23 * @return LaneBasedGTUCharacteristics
24 * @throws ProbabilityException when the generator is improperly configured
25 * @throws ParameterException in case of a parameter problem.
26 * @throws GTUException if strategical planner cannot be created
27 */
28 LaneBasedGTUCharacteristics draw(LaneBasedGTU gtu) throws ProbabilityException, ParameterException, GTUException;
29
30 /**
31 * Return the simulator.
32 * @return OTSDEVSSimulatorInterface; the simulator
33 * @throws ProbabilityException when the generator cannot retrieve the simulator
34 */
35 OTSDEVSSimulatorInterface getSimulator() throws ProbabilityException;
36 }