public static class LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder extends Object implements Serializable
LaneBasedIndividualCar<String> car = new LaneBasedIndividualCarBuilder<String>().setId("Car:"+nr) .setLength(new Length(4.0, METER))....build(); or LaneBasedIndividualCarBuilder<String> carBuilder = new LaneBasedIndividualCarBuilder<String>(); carBuilder.setId("Car:"+nr); carBuilder.setLength(new Length(4.0, METER)); carBuilder.setWidth(new Length(1.8, METER)); ... LaneBasedIndividualCar<String> car = carBuilder.build();
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
LaneBasedIndividualCarBuilder() |
Modifier and Type | Method and Description |
---|---|
LaneBasedIndividualGTU |
build(LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> laneBasedStrategicalPlannerFactory)
Build one LaneBasedIndividualCar.
|
Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> |
getAnimationClass() |
org.opentrafficsim.core.gtu.animation.GTUColorer |
getGtuColorer() |
org.opentrafficsim.core.gtu.GTUType |
getGtuType() |
String |
getId() |
Set<DirectedLanePosition> |
getInitialLongitudinalPositions() |
org.djunits.value.vdouble.scalar.Speed |
getInitialSpeed() |
org.djunits.value.vdouble.scalar.Length |
getLength() |
org.djunits.value.vdouble.scalar.Speed |
getMaximumSpeed() |
org.opentrafficsim.core.network.OTSNetwork |
getNetwork() |
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface |
getSimulator() |
org.djunits.value.vdouble.scalar.Length |
getWidth() |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setAnimationClass(Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setGtuColorer(org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setGtuType(org.opentrafficsim.core.gtu.GTUType gtuType) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setId(String id) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setInitialLongitudinalPositions(Set<DirectedLanePosition> initialLongitudinalPositions) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setInitialSpeed(org.djunits.value.vdouble.scalar.Speed initialSpeed) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setLength(org.djunits.value.vdouble.scalar.Length length) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setMaximumSpeed(org.djunits.value.vdouble.scalar.Speed maximumSpeed) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setNetwork(org.opentrafficsim.core.network.OTSNetwork network) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setSimulator(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder |
setWidth(org.djunits.value.vdouble.scalar.Length width) |
String |
toString() |
public final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setId(String id)
id
- set idpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setGtuType(org.opentrafficsim.core.gtu.GTUType gtuType)
gtuType
- set gtuTypepublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setInitialLongitudinalPositions(Set<DirectedLanePosition> initialLongitudinalPositions)
initialLongitudinalPositions
- set initialLongitudinalPositionspublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setInitialSpeed(org.djunits.value.vdouble.scalar.Speed initialSpeed)
initialSpeed
- set initialSpeedpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setLength(org.djunits.value.vdouble.scalar.Length length)
length
- set lengthpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setWidth(org.djunits.value.vdouble.scalar.Length width)
width
- set widthpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setMaximumSpeed(org.djunits.value.vdouble.scalar.Speed maximumSpeed)
maximumSpeed
- set maximumSpeedpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setSimulator(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
simulator
- set simulatorpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setAnimationClass(Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass)
animationClass
- set animation classpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setGtuColorer(org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer)
gtuColorer
- set gtuColorer.public final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setNetwork(org.opentrafficsim.core.network.OTSNetwork network)
network
- set networkpublic final String getId()
public final org.opentrafficsim.core.gtu.GTUType getGtuType()
public final Set<DirectedLanePosition> getInitialLongitudinalPositions()
public final org.djunits.value.vdouble.scalar.Speed getInitialSpeed()
public final org.djunits.value.vdouble.scalar.Length getLength()
public final org.djunits.value.vdouble.scalar.Length getWidth()
public final org.djunits.value.vdouble.scalar.Speed getMaximumSpeed()
public final org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface getSimulator()
public final Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> getAnimationClass()
public final org.opentrafficsim.core.gtu.animation.GTUColorer getGtuColorer()
public final org.opentrafficsim.core.network.OTSNetwork getNetwork()
public final LaneBasedIndividualGTU build(LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> laneBasedStrategicalPlannerFactory) throws Exception
laneBasedStrategicalPlannerFactory
- factory for the strategical plannerException
- when not all required values have been setCopyright © 2014–2016 Delft University of Technology. All rights reserved.