public final class GeneratorPositions extends Object implements Locatable
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.
Modifier and Type | Class and Description |
---|---|
static class |
GeneratorPositions.GeneratorLanePosition
Class representing a vehicle generation lane, providing elementary information for randomly drawing links and lanes.
|
static class |
GeneratorPositions.LaneBias
Vehicle generation lateral bias.
|
static class |
GeneratorPositions.LaneBiases
Set of lane biases per GTU type.
|
Modifier and Type | Method and Description |
---|---|
static GeneratorPositions |
create(Set<DirectedLanePosition> positions,
StreamInterface stream)
Create a GeneratorPositions object to draw positions from.
|
static GeneratorPositions |
create(Set<DirectedLanePosition> positions,
StreamInterface stream,
GeneratorPositions.LaneBiases biases)
Create a GeneratorPositions object to draw positions from.
|
static GeneratorPositions |
create(Set<DirectedLanePosition> positions,
StreamInterface stream,
GeneratorPositions.LaneBiases biases,
Map<CrossSectionLink,Double> linkWeights)
Create a GeneratorPositions object to draw positions from.
|
static GeneratorPositions |
create(Set<DirectedLanePosition> positions,
StreamInterface stream,
Map<CrossSectionLink,Double> linkWeights)
Create a GeneratorPositions object to draw positions from.
|
GeneratorPositions.GeneratorLanePosition |
draw(GTUType gtuType,
Map<CrossSectionLink,Map<Integer,Integer>> unplaced,
Speed desiredSpeed,
Route route)
Draw a new position to generate a GTU.
|
Set<GeneratorPositions.GeneratorLanePosition> |
getAllPositions()
Returns all underlying positions.
|
javax.media.j3d.Bounds |
getBounds() |
DirectedPoint |
getLocation() |
Speed |
speedLimit(GTUType gtuType)
Returns the speed limit for the given GTU type, prior to the GTU position being determined.
|
public static GeneratorPositions create(Set<DirectedLanePosition> positions, StreamInterface stream)
positions
- Set<DirectedLanePosition>; all considered positions, each lane is considered separatelystream
- StreamInterface; stream for random numberspublic static GeneratorPositions create(Set<DirectedLanePosition> positions, StreamInterface stream, GeneratorPositions.LaneBiases biases)
positions
- Set<DirectedLanePosition>; all considered positions, each lane is considered separatelystream
- StreamInterface; stream for random numbersbiases
- LaneBiases; lane biases for GTU typespublic static GeneratorPositions create(Set<DirectedLanePosition> positions, StreamInterface stream, Map<CrossSectionLink,Double> linkWeights)
positions
- Set<DirectedLanePosition>; all considered positions, each lane is considered separatelystream
- StreamInterface; stream for random numberslinkWeights
- Map<CrossSectionLink, Double>; weight per link directionpublic static GeneratorPositions create(Set<DirectedLanePosition> positions, StreamInterface stream, GeneratorPositions.LaneBiases biases, Map<CrossSectionLink,Double> linkWeights)
positions
- Set<DirectedLanePosition>; all considered positions, each lane is considered separatelystream
- StreamInterface; stream for random numbersbiases
- LaneBiases; lane biases for GTU typeslinkWeights
- Map<CrossSectionLink, Double>; weight per link directionpublic GeneratorPositions.GeneratorLanePosition draw(GTUType gtuType, Map<CrossSectionLink,Map<Integer,Integer>> unplaced, Speed desiredSpeed, Route route)
gtuType
- GTUType; GTU typeunplaced
- Map<CrossSectionLink, Map<Integer, Integer>>; number of unplaced GTUs per lane. The lane
number should match with GeneratorLanePosition.getLaneNumber()
, where 1 is the right-most lane.
Missing lanes are assumed to have no queue.desiredSpeed
- Speed; desired speed, possibly used to determine the biased road positionroute
- Route; route, may be null
public DirectedPoint getLocation() throws RemoteException
getLocation
in interface Locatable
RemoteException
public javax.media.j3d.Bounds getBounds() throws RemoteException
getBounds
in interface Locatable
RemoteException
public Set<GeneratorPositions.GeneratorLanePosition> getAllPositions()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.