Class DefaultGTUCharacteristicsGeneratorOD
java.lang.Object
org.opentrafficsim.road.gtu.generator.od.DefaultGTUCharacteristicsGeneratorOD
- All Implemented Interfaces:
 GTUCharacteristicsGeneratorOD
public final class DefaultGTUCharacteristicsGeneratorOD extends java.lang.Object implements GTUCharacteristicsGeneratorOD
Default generator for 
LaneBasedGTUCharacteristics.
 
 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 classDefaultGTUCharacteristicsGeneratorOD.FactoryFactory forDefaultGTUCharacteristicsGeneratorOD. - 
Constructor Summary
Constructors Constructor Description DefaultGTUCharacteristicsGeneratorOD()Constructor using null-routes, default GTU characteristics and LMRS.DefaultGTUCharacteristicsGeneratorOD(java.util.Set<TemplateGTUType> templates)Constructor using null-routes, provided GTU templates and LMRS.DefaultGTUCharacteristicsGeneratorOD(java.util.Set<TemplateGTUType> templates, StrategicalPlannerFactorySupplierOD factorySupplier)Constructor using null-routes, provided GTU templates and provided strategical planner factory supplier.DefaultGTUCharacteristicsGeneratorOD(Generator<GTUType> gtuTypeGenerator, RouteGeneratorOD routeGenerator, java.util.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, java.util.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
Modifier and Type Method Description LaneBasedGTUCharacteristicsdraw(Node origin, Node destination, Category category, StreamInterface randomStream)Generate newLaneBasedGTUCharacteristicsusing given input from OD. 
- 
Constructor Details
- 
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD()Constructor using null-routes, default GTU characteristics and LMRS. - 
DefaultGTUCharacteristicsGeneratorOD
Constructor using route generator, default GTU characteristics and LMRS.- Parameters:
 routeGenerator- RouteGeneratorOD; route generator
 - 
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(RouteGeneratorOD routeSupplier, java.util.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, java.util.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
Constructor using null-routes, provided GTU templates and LMRS.- Parameters:
 templates- Set<TemplateGTUType>; templates
 - 
DefaultGTUCharacteristicsGeneratorOD
public DefaultGTUCharacteristicsGeneratorOD(java.util.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
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 Details
- 
draw
public LaneBasedGTUCharacteristics draw(Node origin, Node destination, Category category, StreamInterface randomStream) throws GTUExceptionGenerate newLaneBasedGTUCharacteristicsusing given input from OD.- Specified by:
 drawin 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
 
 -