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