View Javadoc
1   package org.opentrafficsim.road.gtu.generator;
2   
3   import java.io.Serializable;
4   import java.util.ArrayList;
5   import java.util.LinkedHashSet;
6   import java.util.List;
7   import java.util.Set;
8   
9   import org.djunits.unit.DurationUnit;
10  import org.djunits.unit.LengthUnit;
11  import org.djunits.unit.SpeedUnit;
12  import org.djunits.value.vdouble.scalar.Duration;
13  import org.djunits.value.vdouble.scalar.Length;
14  import org.djunits.value.vdouble.scalar.Speed;
15  import org.djunits.value.vdouble.scalar.Time;
16  import org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface;
17  import org.opentrafficsim.core.dsol.OTSSimTimeDouble;
18  import org.opentrafficsim.core.gtu.GTUDirectionality;
19  import org.opentrafficsim.core.gtu.GTUException;
20  import org.opentrafficsim.core.gtu.GTUType;
21  import org.opentrafficsim.core.gtu.RelativePosition;
22  import org.opentrafficsim.core.gtu.animation.GTUColorer;
23  import org.opentrafficsim.core.network.NetworkException;
24  import org.opentrafficsim.core.network.OTSNetwork;
25  import org.opentrafficsim.core.network.route.RouteGenerator;
26  import org.opentrafficsim.core.units.distributions.ContinuousDistDoubleScalar;
27  import org.opentrafficsim.road.gtu.animation.DefaultCarAnimation;
28  import org.opentrafficsim.road.gtu.lane.LaneBasedGTU;
29  import org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU;
30  import org.opentrafficsim.road.gtu.lane.LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder;
31  import org.opentrafficsim.road.gtu.lane.perception.headway.Headway;
32  import org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayDistance;
33  import org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGTUSimple;
34  import org.opentrafficsim.road.gtu.lane.tactical.following.GTUFollowingModelOld;
35  import org.opentrafficsim.road.gtu.lane.tactical.following.IDMPlusOld;
36  import org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlanner;
37  import org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlannerFactory;
38  import org.opentrafficsim.road.network.lane.DirectedLanePosition;
39  import org.opentrafficsim.road.network.lane.Lane;
40  
41  import nl.tudelft.simulation.dsol.SimRuntimeException;
42  
43  /**
44   * Common code for LaneBasedGTU generators that may have to postpone putting a GTU on the road due to congestion growing into
45   * the generator. <br>
46   * Generally, these generators will discover that there is not enough room AFTER having decided what kind (particular length) of
47   * GTU will be constructed next. When this happens, the generator must remember the properties of the GTU, but postpone actual
48   * generation until there is enough room.
49   * <p>
50   * Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
51   * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
52   * <p>
53   * @version $Revision: 1401 $, $LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, by $Author: averbraeck $,
54   *          initial version Feb 2, 2015 <br>
55   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
56   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
57   */
58  public abstract class AbstractGTUGenerator implements Serializable
59  {
60      /** */
61      private static final long serialVersionUID = 20150202L;
62  
63      /** The generator name. Will be used for generated GTUs as Name:# where # is the id of the GTU when ID is a String. */
64      private final String name;
65  
66      /** The type of GTU to generate. */
67      private final GTUType gtuType;
68  
69      /** The GTU class to instantiate. */
70      private final Class<?> gtuClass;
71  
72      /** Distribution of the initial speed of the GTU. */
73      private final ContinuousDistDoubleScalar.Rel<Speed, SpeedUnit> initialSpeedDist;
74  
75      /** Distribution of the interarrival time. */
76      private final ContinuousDistDoubleScalar.Rel<Duration, DurationUnit> interarrivelTimeDist;
77  
78      /** Generated number of GTUs. */
79      private long generatedGTUs = 0;
80  
81      /** Maximum number of GTUs to generate. */
82      private final long maxGTUs;
83  
84      /** Start time of generation (delayed start). */
85      private final Time startTime;
86  
87      /** End time of generation. */
88      private final Time endTime;
89  
90      /** Lane to generate the GTU on -- at the end for now. */
91      private final Lane lane;
92  
93      /** Position on the lane, relative to the design line of the link. */
94      private final Length position;
95  
96      /** The direction in which the GTU has to be generated; DIR_PLUS or DIR_MINUS. */
97      private final GTUDirectionality direction;
98  
99      /** GTUColorer to use. */
100     private final GTUColorer gtuColorer;
101 
102     /** The lane-based strategical planner factory to use. */
103     private final LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> strategicalPlannerFactory;
104 
105     /** Route generator. */
106     private final RouteGenerator routeGenerator;
107 
108     /** The network. */
109     private final OTSNetwork network;
110 
111     /** Car builder list. */
112     private List<LaneBasedIndividualCarBuilder> carBuilderList = new ArrayList<>();
113 
114     /** Number of generated GTUs. */
115     @SuppressWarnings("checkstyle:visibilitymodifier")
116     protected long numberGTUs = 0;
117 
118     /**
119      * @param name the name of the generator
120      * @param simulator the simulator to schedule the start of the generation
121      * @param gtuType the type of GTU to generate
122      * @param gtuClass the GTU class to instantiate
123      * @param initialSpeedDist distribution of the initial speed of the GTU
124      * @param interarrivelTimeDist distribution of the interarrival time
125      * @param maxGTUs maximum number of GTUs to generate
126      * @param startTime start time of generation (delayed start)
127      * @param endTime end time of generation
128      * @param lane the lane to generate the GTU on
129      * @param position position on the lane, relative to the design line of the link
130      * @param direction the direction on the lane in which the GTU has to be generated (DIR_PLUS, or DIR_MINUS)
131      * @param gtuColorer the GTUColorer to use
132      * @param strategicalPlannerFactory the lane-based strategical planner factory to use
133      * @param routeGenerator route generator
134      * @param network the network to register the generated GTUs into
135      * @throws SimRuntimeException when simulation scheduling fails
136      */
137     @SuppressWarnings("checkstyle:parameternumber")
138     public AbstractGTUGenerator(final String name, final OTSDEVSSimulatorInterface simulator, final GTUType gtuType,
139             final Class<?> gtuClass, final ContinuousDistDoubleScalar.Rel<Speed, SpeedUnit> initialSpeedDist,
140             final ContinuousDistDoubleScalar.Rel<Duration, DurationUnit> interarrivelTimeDist, final long maxGTUs,
141             final Time startTime, final Time endTime, final Lane lane, final Length position, final GTUDirectionality direction,
142             final GTUColorer gtuColorer,
143             final LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> strategicalPlannerFactory,
144             final RouteGenerator routeGenerator, final OTSNetwork network) throws SimRuntimeException
145     {
146         super();
147         this.name = name;
148         this.gtuType = gtuType;
149         this.gtuClass = gtuClass;
150         this.initialSpeedDist = initialSpeedDist;
151         this.interarrivelTimeDist = interarrivelTimeDist;
152         this.maxGTUs = maxGTUs;
153         this.startTime = startTime;
154         this.endTime = endTime;
155         this.lane = lane;
156         this.position = position;
157         this.direction = direction;
158         this.gtuColorer = gtuColorer;
159         this.strategicalPlannerFactory = strategicalPlannerFactory;
160         this.routeGenerator = routeGenerator;
161         this.network = network;
162 
163         simulator.scheduleEventAbs(startTime, this, this, "generate", null);
164     }
165 
166     /**
167      * Generate a GTU.
168      * @throws Exception when something in the generation fails.
169      */
170     protected final void generate() throws Exception
171     {
172         // check if we are after the end time
173         if (getSimulator().getSimulatorTime().getTime().gt(this.endTime))
174         {
175             return;
176         }
177 
178         // check if we have generated sufficient GTUs
179         if (this.generatedGTUs >= this.maxGTUs)
180         {
181             return;
182         }
183 
184         // create a unique id
185         this.numberGTUs++;
186         String id = this.name + ":" + this.numberGTUs;
187 
188         // create the GTU
189         if (LaneBasedIndividualGTU.class.isAssignableFrom(getGtuClass()))
190         {
191             LaneBasedIndividualCarBuilder carBuilder = new LaneBasedIndividualCarBuilder();
192             carBuilder.setId(id);
193             carBuilder.setGtuType(getGtuType());
194             Length carLength = getLengthDist().draw();
195             carBuilder.setLength(carLength);
196             carBuilder.setWidth(getWidthDist().draw());
197             carBuilder.setMaximumSpeed(getMaximumSpeedDist().draw());
198             carBuilder.setInitialSpeed(getInitialSpeedDist().draw());
199             carBuilder.setSimulator(getSimulator());
200             Set<DirectedLanePosition> initialLongitudinalPositions = new LinkedHashSet<>(1);
201             initialLongitudinalPositions.add(new DirectedLanePosition(this.lane, this.position, this.direction));
202             carBuilder.setInitialLongitudinalPositions(initialLongitudinalPositions);
203             carBuilder.setAnimationClass(DefaultCarAnimation.class);
204             carBuilder.setGtuColorer(this.gtuColorer);
205             carBuilder.setNetwork(this.network);
206             this.generatedGTUs++;
207 
208             if (enoughSpace(carBuilder))
209             {
210                 carBuilder.build(this.strategicalPlannerFactory, this.routeGenerator.draw());
211             }
212             else
213             {
214                 // put the car in the queue and take it from there -- if the headway is enough, build the car.
215                 this.carBuilderList.add(carBuilder);
216                 // System.out.println("GTUGenerator - backlog = " + this.carBuilderList.size());
217                 if (this.carBuilderList.size() == 1)
218                 {
219                     // first entry in list - start the watch thread
220                     getSimulator().scheduleEventRel(new Duration(0.1, DurationUnit.SECOND), this, this, "checkCarBuilderList",
221                             null);
222                 }
223             }
224         }
225         else
226         {
227             throw new GTUException("GTU class " + getGtuClass().getName() + ": cannot instantiate, no builder.");
228         }
229 
230         // reschedule next arrival
231         OTSSimTimeDouble nextTime = getSimulator().getSimulatorTime().plus(this.interarrivelTimeDist.draw());
232         if (nextTime.get().le(this.endTime))
233         {
234             getSimulator().scheduleEventAbs(nextTime, this, this, "generate", null);
235         }
236     }
237 
238     /**
239      * Check if the car to be built is not overlapping with another GTU on the same lane, and if it has enough headway to be
240      * generated safely.
241      * @param carBuilder the car to be generated
242      * @return true if car can be safely built, false otherwise.
243      * @throws NetworkException when the speed limit of the lane is not known
244      * @throws GTUException if GTU does not have a position on the lane where it is registered
245      */
246     protected final boolean enoughSpace(final LaneBasedIndividualCarBuilder carBuilder) throws NetworkException, GTUException
247     {
248         DirectedLanePosition directedLanePosition = carBuilder.getInitialLongitudinalPositions().iterator().next();
249         Lane generatorLane = directedLanePosition.getLane();
250         double genPosSI = directedLanePosition.getPosition().getSI();
251         // GTUDirectionality direction = directedLanePosition.getGtuDirection();
252         // XXX different from this.direction?
253         double lengthSI = generatorLane.getLength().getSI();
254         double frontNew = (genPosSI + carBuilder.getLength().getSI()) / lengthSI;
255         double rearNew = genPosSI / lengthSI;
256 
257         // test for overlap with other GTUs
258         for (LaneBasedGTU gtu : generatorLane.getGtuList())
259         {
260             double frontGTU = gtu.fractionalPosition(generatorLane, gtu.getFront());
261             double rearGTU = gtu.fractionalPosition(generatorLane, gtu.getRear());
262             if ((frontNew >= rearGTU && frontNew <= frontGTU) || (rearNew >= rearGTU && rearNew <= frontGTU)
263                     || (frontGTU >= rearNew && frontGTU <= frontNew) || (rearGTU >= rearNew && rearGTU <= frontNew))
264             {
265                 // System.out.println(getSimulator().getSimulatorTime() + ", generator overlap with GTU " + gtu);
266                 return false;
267             }
268         }
269 
270         // test for sufficient headway
271         GTUFollowingModelOld followingModel = new IDMPlusOld();
272         // carBuilder.getStrategicalPlanner().getBehavioralCharacteristics().getGTUFollowingModel();
273 
274         Headway headway = headway(new Length(250.0, LengthUnit.METER), generatorLane);
275         Length minimumHeadway = new Length(0.0, LengthUnit.METER);
276         if (headway.getObjectType().isGtu())
277         {
278             minimumHeadway = followingModel.minimumHeadway(carBuilder.getInitialSpeed(), headway.getSpeed(),
279                     new Length(1.0, LengthUnit.CENTIMETER), new Length(250.0, LengthUnit.METER),
280                     generatorLane.getSpeedLimit(carBuilder.getGtuType()), carBuilder.getMaximumSpeed());
281             // WS: changed mininumHeadway to headway.getDistance()
282             double acc = followingModel.computeAcceleration(carBuilder.getInitialSpeed(), carBuilder.getMaximumSpeed(),
283                     headway.getSpeed(), headway.getDistance(), carBuilder.getMaximumSpeed()).getSI();
284             if (acc < 0)
285             {
286                 // System.err.println(getSimulator().getSimulatorTime() + ", generator headway for GTU " + headway.getId()
287                 // + ", distance " + headway.getDistance().si + " m, max " + minimumHeadway + ", has to brake with a="
288                 // + acc + " m/s^2");
289                 return false;
290             }
291         }
292 
293         // System.out.println(getSimulator().getSimulatorTime() + ", generator headway for GTU " + headwayGTU.getOtherGTU()
294         // + ", distance " + headwayGTU.getDistance().si + " m, max " + minimumHeadway);
295         return headway.getDistance().ge(minimumHeadway);
296     }
297 
298     /**
299      * Calculate the minimum headway, possibly on subsequent lanes, in DIR_PLUS direction.
300      * @param theLane the lane where we are looking right now
301      * @param lanePositionSI from which position on this lane do we start measuring? This is the current position of the GTU
302      *            when we measure in the lane where the original GTU is positioned, and 0.0 for each subsequent lane
303      * @param cumDistanceSI the distance we have already covered searching on previous lanes
304      * @param maxDistanceSI the maximum distance to look for in SI units; stays the same in subsequent calls
305      * @param when the current or future time for which to calculate the headway
306      * @return the headway in SI units when we have found the GTU, or a null GTU with a distance of Double.MAX_VALUE meters when
307      *         no other GTU could not be found within maxDistanceSI meters
308      * @throws GTUException when there is a problem with the geometry of the network
309      */
310     private Headway headwayRecursiveForwardSI(final Lane theLane, final double lanePositionSI, final double cumDistanceSI,
311             final double maxDistanceSI, final Time when) throws GTUException
312     {
313         // TODO: THIS METHOD IS ALSO IN PERCEPTION -- DON'T DUPLICATE; ALSO, THIS VERSION IS WRONG.
314         LaneBasedGTU otherGTU = theLane.getGtuAhead(new Length(lanePositionSI, LengthUnit.METER), GTUDirectionality.DIR_PLUS,
315                 RelativePosition.REAR, when);
316         if (otherGTU != null)
317         {
318             double distanceM = cumDistanceSI + otherGTU.position(theLane, otherGTU.getRear(), when).getSI() - lanePositionSI;
319             if (distanceM > 0 && distanceM <= maxDistanceSI)
320             {
321                 return new HeadwayGTUSimple(otherGTU.getId(), otherGTU.getGTUType(), new Length(distanceM, LengthUnit.SI),
322                         otherGTU.getLength(), otherGTU.getSpeed(), null);
323             }
324             return new HeadwayDistance(Double.MAX_VALUE);
325         }
326 
327         // Continue search on successor lanes.
328         if (cumDistanceSI + theLane.getLength().getSI() - lanePositionSI < maxDistanceSI)
329         {
330             // is there a successor link?
331             if (theLane.nextLanes(this.gtuType).size() > 0)
332             {
333                 Headway foundMaxGTUDistanceSI = new HeadwayDistance(Double.MAX_VALUE);
334                 for (Lane nextLane : theLane.nextLanes(this.gtuType).keySet())
335                 {
336                     // TODO Only follow links on the Route if there is a "real" Route
337                     // if (routeNavigator.getRoute() == null || routeNavigator.getRoute().size() == 0 /* XXXXX STUB dummy route
338                     // */
339                     // || routeNavigator.getRoute().containsLink((Link) theLane.getParentLink()))
340                     {
341                         double traveledDistanceSI = cumDistanceSI + theLane.getLength().getSI() - lanePositionSI;
342                         Headway closest = headwayRecursiveForwardSI(nextLane, 0.0, traveledDistanceSI, maxDistanceSI, when);
343                         if (closest.getDistance().si < maxDistanceSI
344                                 && closest.getDistance().si < foundMaxGTUDistanceSI.getDistance().si)
345                         {
346                             foundMaxGTUDistanceSI = closest;
347                         }
348                     }
349                 }
350                 return foundMaxGTUDistanceSI;
351             }
352         }
353 
354         // No other GTU was not on one of the current lanes or their successors.
355         return new HeadwayDistance(Double.MAX_VALUE);
356     }
357 
358     /**
359      * Calculate the minimum headway, possibly on subsequent lanes, in DIR_MINUS direction.
360      * @param theLane the lane where we are looking right now
361      * @param lanePositionSI from which position on this lane do we start measuring? This is the current position of the GTU
362      *            when we measure in the lane where the original GTU is positioned, and 0.0 for each subsequent lane
363      * @param cumDistanceSI the distance we have already covered searching on previous lanes
364      * @param maxDistanceSI the maximum distance to look for in SI units; stays the same in subsequent calls
365      * @param when the current or future time for which to calculate the headway
366      * @return the headway in SI units when we have found the GTU, or a null GTU with a distance of Double.MAX_VALUE meters when
367      *         no other GTU could not be found within maxDistanceSI meters
368      * @throws GTUException when there is a problem with the geometry of the network
369      */
370     private Headway headwayRecursiveBackwardSI(final Lane theLane, final double lanePositionSI, final double cumDistanceSI,
371             final double maxDistanceSI, final Time when) throws GTUException
372     {
373         // TODO: THIS METHOD IS ALSO IN PERCEPTION -- DON'T DUPLICATE; ALSO, THIS VERSION IS WRONG.
374         LaneBasedGTU otherGTU = theLane.getGtuBehind(new Length(lanePositionSI, LengthUnit.METER), GTUDirectionality.DIR_PLUS,
375                 RelativePosition.FRONT, when);
376         if (otherGTU != null)
377         {
378             double distanceM = cumDistanceSI + otherGTU.position(theLane, otherGTU.getFront(), when).getSI() - lanePositionSI;
379             if (distanceM > 0 && distanceM <= maxDistanceSI)
380             {
381                 return new HeadwayGTUSimple(otherGTU.getId(), otherGTU.getGTUType(), new Length(distanceM, LengthUnit.SI),
382                         otherGTU.getLength(), otherGTU.getSpeed(), null);
383             }
384             return new HeadwayDistance(Double.MAX_VALUE);
385         }
386 
387         // Continue search on all predecessor lanes.
388         if (cumDistanceSI + theLane.getLength().getSI() - lanePositionSI < maxDistanceSI)
389         {
390             // is there a predecessor link?
391             if (theLane.prevLanes(this.gtuType).size() > 0)
392             {
393                 Headway foundMaxGTUDistanceSI = new HeadwayDistance(Double.MAX_VALUE);
394                 for (Lane prevLane : theLane.prevLanes(this.gtuType).keySet())
395                 {
396                     // TODO Only follow links on the Route if there is a "real" Route
397                     // if (routeNavigator.getRoute() == null || routeNavigator.getRoute().size() == 0 /* XXXXX STUB dummy route
398                     // */
399                     // || routeNavigator.getRoute().containsLink((Link) theLane.getParentLink()))
400                     {
401                         double traveledDistanceSI = cumDistanceSI + theLane.getLength().getSI() - lanePositionSI;
402                         Headway closest = headwayRecursiveBackwardSI(prevLane, 0.0, traveledDistanceSI, maxDistanceSI, when);
403                         if (closest.getDistance().si < maxDistanceSI
404                                 && closest.getDistance().si < foundMaxGTUDistanceSI.getDistance().si)
405                         {
406                             foundMaxGTUDistanceSI = closest;
407                         }
408                     }
409                 }
410                 return foundMaxGTUDistanceSI;
411             }
412         }
413 
414         // No other GTU was not on one of the current lanes or their successors.
415         return new HeadwayDistance(Double.MAX_VALUE);
416     }
417 
418     /**
419      * Find the first GTU starting on the specified lane following the specified route.
420      * @param maxDistanceSI the maximum distance to look for in SI units
421      * @param generatorLane Lane; the lane on which the the search for a leader starts
422      * @return the nearest GTU and the net headway to this GTU in SI units when we have found the GTU, or a null GTU with a
423      *         distance of Double.MAX_VALUE meters when no other GTU could not be found within maxDistanceSI meters
424      * @throws GTUException when there is a problem with the geometry of the network
425      */
426     private Headway headwayGTUSIForward(final double maxDistanceSI, final Lane generatorLane) throws GTUException
427     {
428         Time when = getSimulator().getSimulatorTime().getTime();
429         Headway foundMaxGTUDistanceSI = new HeadwayDistance(Double.MAX_VALUE);
430         // search for the closest GTU on all current lanes we are registered on.
431         Headway closest;
432         if (this.direction.equals(GTUDirectionality.DIR_PLUS))
433         {
434             closest = headwayRecursiveForwardSI(this.lane, 0.0, 0.0, maxDistanceSI, when);
435         }
436         else
437         {
438             closest = headwayRecursiveBackwardSI(this.lane, generatorLane.getLength().getSI(), 0.0, maxDistanceSI, when);
439         }
440         if (closest.getDistance().si < maxDistanceSI && closest.getDistance().si < foundMaxGTUDistanceSI.getDistance().si)
441         {
442             foundMaxGTUDistanceSI = closest;
443         }
444         return foundMaxGTUDistanceSI;
445     }
446 
447     /**
448      * Check the available headway for GTU that is about to be constructed.
449      * @param maxDistance Length; the maximum distance to look for a leader
450      * @param generatorLane Lane; the lane on which the GTU is generated
451      * @return HeadwayGTU; the available headway and the GTU at that headway
452      * @throws GTUException on network inconsistency
453      */
454     public final Headway headway(final Length maxDistance, final Lane generatorLane) throws GTUException
455     {
456         return headwayGTUSIForward(maxDistance.getSI(), generatorLane);
457     }
458 
459     /**
460      * Check if car can be generated.
461      * @throws Exception on any problem
462      */
463     protected final void checkCarBuilderList() throws Exception
464     {
465         if (!this.carBuilderList.isEmpty())
466         {
467             LaneBasedIndividualCarBuilder carBuilder = this.carBuilderList.get(0);
468             if (enoughSpace(carBuilder))
469             {
470                 this.carBuilderList.remove(0);
471                 carBuilder.build(this.strategicalPlannerFactory, this.routeGenerator.draw());
472             }
473         }
474 
475         // only reschedule if list not empty
476         if (!this.carBuilderList.isEmpty())
477         {
478             getSimulator().scheduleEventRel(new Duration(0.1, DurationUnit.SECOND), this, this, "checkCarBuilderList", null);
479         }
480     }
481 
482     /** @return simulator. */
483     public abstract OTSDEVSSimulatorInterface getSimulator();
484 
485     /** @return lengthDist. */
486     public abstract ContinuousDistDoubleScalar.Rel<Length, LengthUnit> getLengthDist();
487 
488     /** @return widthDist. */
489     public abstract ContinuousDistDoubleScalar.Rel<Length, LengthUnit> getWidthDist();
490 
491     /** @return maximumSpeedDist. */
492     public abstract ContinuousDistDoubleScalar.Rel<Speed, SpeedUnit> getMaximumSpeedDist();
493 
494     /**
495      * @return name.
496      */
497     public final String getName()
498     {
499         return this.name;
500     }
501 
502     /**
503      * @return gtuType.
504      */
505     public final GTUType getGtuType()
506     {
507         return this.gtuType;
508     }
509 
510     /**
511      * @return gtuClass.
512      */
513     public final Class<?> getGtuClass()
514     {
515         return this.gtuClass;
516     }
517 
518     /**
519      * @return initialSpeedDist.
520      */
521     public final ContinuousDistDoubleScalar.Rel<Speed, SpeedUnit> getInitialSpeedDist()
522     {
523         return this.initialSpeedDist;
524     }
525 
526     /**
527      * @return interarrivelTimeDist.
528      */
529     public final ContinuousDistDoubleScalar.Rel<Duration, DurationUnit> getInterarrivelTimeDist()
530     {
531         return this.interarrivelTimeDist;
532     }
533 
534     /**
535      * @return maxGTUs.
536      */
537     public final long getMaxGTUs()
538     {
539         return this.maxGTUs;
540     }
541 
542     /**
543      * @return startTime.
544      */
545     public final Time getStartTime()
546     {
547         return this.startTime;
548     }
549 
550     /**
551      * @return endTime.
552      */
553     public final Time getEndTime()
554     {
555         return this.endTime;
556     }
557 
558     /**
559      * @return gtuColorer.
560      */
561     public final GTUColorer getGtuColorer()
562     {
563         return this.gtuColorer;
564     }
565 
566     /**
567      * @return strategicalPlanner
568      */
569     public final LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> getStrategicalPlannerFactory()
570     {
571         return this.strategicalPlannerFactory;
572     }
573 
574 }