aim4.im
Interface TrackModel

All Known Implementing Classes:
RoadBasedTrackModel

public interface TrackModel

The interface of track models


Method Summary
 RoadBasedIntersection getIntersection()
          Get the intersection managed by this track model
 List<Lane> getSortedDepartureLanes(Lane arrivalLane, Road departure)
          Given an arrival Lane and a departure Road, get an ordered List of Lanes that represents the Lanes from highest to lowest priority based on distance from the arrival Lane.
 boolean trajectoriesConflict(int l11, int l12, int l21, int l22)
          Determine whether two trajectories overlap.
 double traversalDistance(int arrivalID, int departureID)
          Get the distance from the entry of the Lane with the first given ID, to the departure of the Lane with the other given ID, if traveling along segments through their point of intersection.
 double traversalDistance(Lane arrival, Lane departure)
          Get the distance from the entry of the given Lane, to the departure of the other given Lane, if traveling along segments through their point of intersection.
 double traversalDistance(Road arrival, Road departure)
          Get the distance from the entry of the given Road, to the departure of the other given Road.
 

Method Detail

getIntersection

RoadBasedIntersection getIntersection()
Get the intersection managed by this track model

Returns:
the intersection managed by this track model

traversalDistance

double traversalDistance(Road arrival,
                         Road departure)
Get the distance from the entry of the given Road, to the departure of the other given Road.

Parameters:
arrival - the arrival Road
departure - the departure Road
Returns:
the distance from the entry of the arrival Road to the exit of the departure Road

traversalDistance

double traversalDistance(Lane arrival,
                         Lane departure)
Get the distance from the entry of the given Lane, to the departure of the other given Lane, if traveling along segments through their point of intersection.

Parameters:
arrival - the arrival Lane
departure - the departure Lane
Returns:
the distance from the entry of the arrival Lane to the exit of the departure Lane through their intersection

traversalDistance

double traversalDistance(int arrivalID,
                         int departureID)
Get the distance from the entry of the Lane with the first given ID, to the departure of the Lane with the other given ID, if traveling along segments through their point of intersection.

Parameters:
arrivalID - the ID number of the arrival Lane
departureID - the ID number of the departure Lane
Returns:
the distance from the entry of the arrival Lane to the exit of the departure Lane through their intersection

getSortedDepartureLanes

List<Lane> getSortedDepartureLanes(Lane arrivalLane,
                                   Road departure)
Given an arrival Lane and a departure Road, get an ordered List of Lanes that represents the Lanes from highest to lowest priority based on distance from the arrival Lane.

Parameters:
arrivalLane - the Lane in which the vehicle is arriving
departure - the Road by which the vehicle is departing
Returns:
the ordered List of Lanes, by priority, into which the vehicle should try to turn

trajectoriesConflict

boolean trajectoriesConflict(int l11,
                             int l12,
                             int l21,
                             int l22)
Determine whether two trajectories overlap. Errs on the side of caution.

Parameters:
l11 - the ID number of the entry lane for the first trajectory
l12 - the ID number of the exit lane for the first trajectory
l21 - the ID number of the entry lane for the second trajectory
l22 - the ID number of the exit lane for the second trajectory
Returns:
whether the trajectories specified conflict


Copyright © 2011. All Rights Reserved.