|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.traffic.track.Track
This class implements the TrackInterface.
| Field Summary | |
protected TrackLinkInterface |
endLink
the end link |
protected java.lang.String |
name
the name (id) of the track |
protected TrackLinkInterface |
startLink
the start link |
protected static int |
TRACK_ROUTE_ACTIVE
active route from a certain point |
protected static int |
TRACK_ROUTE_ALL
all routes from a certain point |
protected static int |
TRACK_ROUTE_LINE
line route from a certain point |
protected java.util.List |
vehicles
the vehicles on the track |
| Constructor Summary | |
Track(java.lang.String name,
TrackLinkInterface startLink,
TrackLinkInterface endLink)
|
|
| Method Summary | |
void |
addControlPoint(ControlPointInterface cp)
This method adds a controlPoint to this track. |
void |
addVehicle(VehiclePhysicalInterface vehicle)
indicate that a vehicle is driving on the track (with front) |
static double |
calculateDistanceFrontBack(TrackProgression tp0,
TrackProgression tp1,
double maxDistance)
|
static double |
calculateDistanceFrontBack(VehiclePhysicalInterface vehicle0,
VehiclePhysicalInterface vehicle1)
|
TrackProgression |
calculateTrackProgressionListActive(double delta)
Calculate a position on the 'active' track located 'delta' meters from the start of the current track. |
java.util.List |
calculateTrackProgressionListAll(double delta)
Calculate all positions on tracks located 'delta' meters from the start of the current track. |
java.util.List |
calculateTrackProgressionListLine(double delta,
java.lang.String line)
Calculate a position on a track located 'delta' meters from the start of the current track. |
ControlPointsList |
getControlPoints()
Returns controlpoints for the track, as a sorted list. |
ControlPointsList |
getCpsOnInterval(double progression,
double lengthOfInterval)
This method checks for controlPoints in an interval, inclusive, so returns cps that are on the edges of the interval |
double |
getdx()
|
double |
getdy()
|
TrackLinkInterface |
getEndLink()
This method returns the link seen as the link at which the track ends. |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation()
|
TrackLinkInterface |
getStartLink()
This method returns the link seen as the link from which the track starts. |
java.util.List |
getVehiclesOnTrack()
get the vehicles on the track |
void |
removeControlPoint(ControlPointInterface cp)
This method removes a given cp from the ControlPointsLists of the track. |
void |
removeVehicle(VehiclePhysicalInterface vehicle)
indicate that a vehicle is no longer driving on the track (with front) |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.traffic.track.TrackInterface |
getLength, getLocationOfProgression |
| Methods inherited from interface nl.tudelft.simulation.dsol.animation.LocatableInterface |
getBounds |
| Field Detail |
protected java.lang.String name
protected TrackLinkInterface startLink
protected TrackLinkInterface endLink
protected java.util.List vehicles
protected static final int TRACK_ROUTE_ALL
protected static final int TRACK_ROUTE_ACTIVE
protected static final int TRACK_ROUTE_LINE
| Constructor Detail |
public Track(java.lang.String name,
TrackLinkInterface startLink,
TrackLinkInterface endLink)
name - startLink - endLink - | Method Detail |
public TrackLinkInterface getStartLink()
TrackInterface
getStartLink in interface TrackInterfaceTrackInterface.getStartLink()public TrackLinkInterface getEndLink()
TrackInterface
getEndLink in interface TrackInterfaceTrackInterface.getEndLink()public ControlPointsList getControlPoints()
TrackInterface
getControlPoints in interface TrackInterfaceTrackInterface.getControlPoints()public void addControlPoint(ControlPointInterface cp)
TrackInterface
addControlPoint in interface TrackInterfacecp - TrackInterface.addControlPoint(nl.tudelft.simulation.traffic.controlpoint.ControlPointInterface)
public ControlPointsList getCpsOnInterval(double progression,
double lengthOfInterval)
TrackInterface
getCpsOnInterval in interface TrackInterfaceprogression - lengthOfInterval -
TrackInterface.getCpsOnInterval(
double, double)public double getdx()
public double getdy()
public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
throws java.rmi.RemoteException
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableInterfacejava.rmi.RemoteExceptionLocatableInterface.getLocation()public void removeControlPoint(ControlPointInterface cp)
TrackInterface
removeControlPoint in interface TrackInterfacecp - TrackInterface.removeControlPoint(nl.tudelft.simulation.traffic.controlpoint.ControlPointInterface)public java.lang.String toString()
public void addVehicle(VehiclePhysicalInterface vehicle)
TrackInterface
addVehicle in interface TrackInterfacevehicle - TrackInterface.addVehicle(nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface)public void removeVehicle(VehiclePhysicalInterface vehicle)
TrackInterface
removeVehicle in interface TrackInterfacevehicle - TrackInterface.removeVehicle(nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface)public java.util.List getVehiclesOnTrack()
TrackInterface
getVehiclesOnTrack in interface TrackInterfaceTrackInterface.getVehiclesOnTrack()public java.util.List calculateTrackProgressionListAll(double delta)
calculateTrackProgressionListAll in interface TrackInterfacedelta -
public TrackProgression calculateTrackProgressionListActive(double delta)
calculateTrackProgressionListActive in interface TrackInterfacedelta -
public java.util.List calculateTrackProgressionListLine(double delta,
java.lang.String line)
calculateTrackProgressionListLine in interface TrackInterfacedelta - line -
public static double calculateDistanceFrontBack(VehiclePhysicalInterface vehicle0,
VehiclePhysicalInterface vehicle1)
vehicle0 - vehicle1 -
public static double calculateDistanceFrontBack(TrackProgression tp0,
TrackProgression tp1,
double maxDistance)
tp0 - tp1 - maxDistance -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||