Class DefaultGTUCharacteristicsGeneratorOD
- java.lang.Object
-
- org.opentrafficsim.road.gtu.generator.od.DefaultGTUCharacteristicsGeneratorOD
-
- All Implemented Interfaces:
GTUCharacteristicsGeneratorOD
public final class DefaultGTUCharacteristicsGeneratorOD extends Object implements GTUCharacteristicsGeneratorOD
Default generator forLaneBasedGTUCharacteristics
.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 10 dec. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultGTUCharacteristicsGeneratorOD.Factory
Factory forDefaultGTUCharacteristicsGeneratorOD
.
-
Constructor Summary
Constructors Constructor Description DefaultGTUCharacteristicsGeneratorOD()
Constructor using null-routes, default GTU characteristics and LMRS.DefaultGTUCharacteristicsGeneratorOD(Set<TemplateGTUType> templates)
Constructor using null-routes, provided GTU templates and LMRS.DefaultGTUCharacteristicsGeneratorOD(Set<TemplateGTUType> templates, StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using null-routes, provided GTU templates and provided strategical planner factory supplier.DefaultGTUCharacteristicsGeneratorOD(Generator<GTUType> gtuTypeGenerator, RouteGeneratorOD routeGenerator, Set<TemplateGTUType> templates, StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using route supplier, provided GTU templates and provided strategical planner factory supplier.DefaultGTUCharacteristicsGeneratorOD(StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using using null-routes, default GTU characteristics and provided GTU templates and provided strategical planner factory supplier.DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeGenerator)
Constructor using route generator, default GTU characteristics and LMRS.DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeSupplier, Set<TemplateGTUType> templates)
Constructor using route supplier, provided GTU templates and LMRS.DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeGenerator, StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using route supplier, default GTU characteristics and provided strategical planner factory supplier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LaneBasedGTUCharacteristics
draw(Node origin, Node destination, Category category, StreamInterface randomStream)
Generate newLaneBasedGTUCharacteristics
using given input from OD.
-
-
-
Constructor Detail
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD()
Constructor using null-routes, default GTU characteristics and LMRS.
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeGenerator)
Constructor using route generator, default GTU characteristics and LMRS.- Parameters:
routeGenerator
- RouteGeneratorOD; route generator
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeSupplier, Set<TemplateGTUType> templates)
Constructor using route supplier, provided GTU templates and LMRS.- Parameters:
routeSupplier
- RouteGeneratorOD; route suppliertemplates
- Set<TemplateGTUType>; templates
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeGenerator, StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using route supplier, default GTU characteristics and provided strategical planner factory supplier.- Parameters:
routeGenerator
- RouteGeneratorOD; route generatorfactorySupplier
- StrategicalPlannerFactorySupplierOD; strategical factory supplier
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(Generator<GTUType> gtuTypeGenerator, RouteGeneratorOD routeGenerator, Set<TemplateGTUType> templates, StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using route supplier, provided GTU templates and provided strategical planner factory supplier.- Parameters:
gtuTypeGenerator
- Generator<GTUType>; GTU type generatorrouteGenerator
- RouteGeneratorOD; route generatortemplates
- Set<TemplateGTUType>; templatesfactorySupplier
- StrategicalPlannerFactorySupplierOD; strategical factory supplier
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(Set<TemplateGTUType> templates)
Constructor using null-routes, provided GTU templates and LMRS.- Parameters:
templates
- Set<TemplateGTUType>; templates
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(Set<TemplateGTUType> templates, StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using null-routes, provided GTU templates and provided strategical planner factory supplier.- Parameters:
templates
- Set<TemplateGTUType>; templatesfactorySupplier
- StrategicalPlannerFactorySupplierOD; strategical factory supplier
-
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(StrategicalPlannerFactorySupplierOD factorySupplier)
Constructor using using null-routes, default GTU characteristics and provided GTU templates and provided strategical planner factory supplier.- Parameters:
factorySupplier
- StrategicalPlannerFactorySupplierOD; strategical factory supplier
-
-
Method Detail
-
draw
public LaneBasedGTUCharacteristics draw(Node origin, Node destination, Category category, StreamInterface randomStream) throws GTUException
Generate newLaneBasedGTUCharacteristics
using given input from OD.- Specified by:
draw
in interfaceGTUCharacteristicsGeneratorOD
- Parameters:
origin
- Node; origindestination
- Node; destinationcategory
- Category; category (GTU type, route, or more)randomStream
- StreamInterface; stream for random numbers- Returns:
- LaneBasedGTUCharacteristics
- Throws:
GTUException
- if characteristics could not be generated for the GTUException
-
-