aim4.map.destination
Class RatioDestinationSelector

java.lang.Object
  extended by aim4.map.destination.RatioDestinationSelector
All Implemented Interfaces:
DestinationSelector

public class RatioDestinationSelector
extends Object
implements DestinationSelector

The destination selector that


Constructor Summary
RatioDestinationSelector(BasicMap map, TrafficVolume trafficVolume)
          Create a new RandomDestinationSelector from the given Layout.
 
Method Summary
 Road selectDestination(Lane currentLane)
          Select the Road which the given Vehicle should use as its destination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatioDestinationSelector

public RatioDestinationSelector(BasicMap map,
                                TrafficVolume trafficVolume)
Create a new RandomDestinationSelector from the given Layout.

Parameters:
map - the Layout from which to create the RandomDestinationSelector
trafficVolume - the traffic volume
Method Detail

selectDestination

public Road selectDestination(Lane currentLane)
Select the Road which the given Vehicle should use as its destination.

Specified by:
selectDestination in interface DestinationSelector
Parameters:
currentLane - the lane the Vehicle is currently on, usually also the lane the vehicle spawned on
Returns:
the Road which the Vehicle should use as its destination


Copyright © 2011. All Rights Reserved.