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-2019 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() |
public final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setId(String id)
id
- String; set idpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setGtuType(GTUType gtuType)
gtuType
- GTUType; set gtuTypepublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setInitialLongitudinalPositions(Set<DirectedLanePosition> initialLongitudinalPositions)
initialLongitudinalPositions
- Set<DirectedLanePosition>; set initialLongitudinalPositionspublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setInitialSpeed(Speed initialSpeed)
initialSpeed
- Speed; set initialSpeedpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setLength(Length length)
length
- Length; set lengthpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setWidth(Length width)
width
- Length; set widthpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setMaximumSpeed(Speed maximumSpeed)
maximumSpeed
- Speed; set maximumSpeedpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setMaximumAcceleration(Acceleration maximumAcceleration)
maximumAcceleration
- Acceleration; maximum accelerationpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setMaximumDeceleration(Acceleration maximumDeceleration)
maximumDeceleration
- Acceleration; maximum deceleration (a negative value)public final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setSimulator(OTSSimulatorInterface simulator)
simulator
- OTSSimulatorInterface; set simulatorpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setFront(Length front)
front
- Length; distance of the front relative to the reference pointpublic final LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder setNetwork(OTSNetwork network)
network
- OTSNetwork; set networkpublic final String getId()
public final GTUType getGtuType()
public final Set<DirectedLanePosition> getInitialLongitudinalPositions()
public final Speed getInitialSpeed()
public final Length getLength()
public final Length getWidth()
public final Speed getMaximumSpeed()
public final DEVSSimulatorInterface.TimeDoubleUnit getSimulator()
public final OTSNetwork getNetwork()
public final LaneBasedIndividualGTU build(LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> laneBasedStrategicalPlannerFactory, Route route, Node origin, Node destination) throws Exception
laneBasedStrategicalPlannerFactory
- LaneBasedStrategicalPlannerFactory<? extends
LaneBasedStrategicalPlanner>; LaneBasedStrategicalPlannerFactory<? extends
LaneBasedStrategicalPlanner>; LaneBasedStrategicalPlannerFactory<? extends
LaneBasedStrategicalPlanner>; LaneBasedStrategicalPlannerFactory<? extends
LaneBasedStrategicalPlanner>; factory for the strategical plannerroute
- Route; routeorigin
- Node; origindestination
- Node; destinationException
- when not all required values have been setCopyright © 2014–2019 Delft University of Technology. All rights reserved.