public final class GeneratorPositions extends Object implements nl.tudelft.simulation.dsol.animation.Locatable
 Copyright (c) 2013-2018 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. 
 | 
(package private) static interface  | 
GeneratorPositions.RoadPosition
Interface for preferred road position for a lane bias. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static GeneratorPositions | 
create(Set<DirectedLanePosition> positions,
      nl.tudelft.simulation.jstats.streams.StreamInterface stream)
Create a GeneratorPositions object to draw positions from. 
 | 
static GeneratorPositions | 
create(Set<DirectedLanePosition> positions,
      nl.tudelft.simulation.jstats.streams.StreamInterface stream,
      GeneratorPositions.LaneBiases biases)
Create a GeneratorPositions object to draw positions from. 
 | 
static GeneratorPositions | 
create(Set<DirectedLanePosition> positions,
      nl.tudelft.simulation.jstats.streams.StreamInterface stream,
      GeneratorPositions.LaneBiases biases,
      Map<CrossSectionLink,Double> linkWeights)
Create a GeneratorPositions object to draw positions from. 
 | 
static GeneratorPositions | 
create(Set<DirectedLanePosition> positions,
      nl.tudelft.simulation.jstats.streams.StreamInterface stream,
      Map<CrossSectionLink,Double> linkWeights)
Create a GeneratorPositions object to draw positions from. 
 | 
GeneratorPositions.GeneratorLanePosition | 
draw(org.opentrafficsim.core.gtu.GTUType gtuType,
    Map<CrossSectionLink,Map<Integer,Integer>> unplaced,
    org.djunits.value.vdouble.scalar.Speed desiredSpeed,
    org.opentrafficsim.core.network.route.Route route)
Draw a new position to generate a GTU. 
 | 
Set<GeneratorPositions.GeneratorLanePosition> | 
getAllPositions()
Returns all underlying positions. 
 | 
javax.media.j3d.Bounds | 
getBounds() | 
nl.tudelft.simulation.language.d3.DirectedPoint | 
getLocation() | 
org.djunits.value.vdouble.scalar.Speed | 
speedLimit(org.opentrafficsim.core.gtu.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, nl.tudelft.simulation.jstats.streams.StreamInterface stream)
positions - Set<DirectedLanePosition>; all considered positions, each lane is considered separatelystream - StreamInterface; stream for random numberspublic static GeneratorPositions create(Set<DirectedLanePosition> positions, nl.tudelft.simulation.jstats.streams.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, nl.tudelft.simulation.jstats.streams.StreamInterface stream, Map<CrossSectionLink,Double> linkWeights)
positions - Set<DirectedLanePosition>; all considered positions, each lane is considered separatelystream - StreamInterface; stream for random numberslinkWeights - Map; weight per link directionpublic static GeneratorPositions create(Set<DirectedLanePosition> positions, nl.tudelft.simulation.jstats.streams.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; weight per link directionpublic GeneratorPositions.GeneratorLanePosition draw(org.opentrafficsim.core.gtu.GTUType gtuType, Map<CrossSectionLink,Map<Integer,Integer>> unplaced, org.djunits.value.vdouble.scalar.Speed desiredSpeed, org.opentrafficsim.core.network.route.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 nullpublic nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
                                                            throws RemoteException
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableRemoteExceptionpublic javax.media.j3d.Bounds getBounds()
                                 throws RemoteException
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableRemoteExceptionpublic Set<GeneratorPositions.GeneratorLanePosition> getAllPositions()
public org.djunits.value.vdouble.scalar.Speed speedLimit(org.opentrafficsim.core.gtu.GTUType gtuType)
gtuType - GTUType; GTU typeCopyright © 2014–2018 Delft University of Technology. All rights reserved.