Package org.matsim.contrib.dvrp.tracker
Class OnlineDriveTaskTrackerImpl
- java.lang.Object
-
- org.matsim.contrib.dvrp.tracker.OnlineDriveTaskTrackerImpl
-
- All Implemented Interfaces:
OnlineDriveTaskTracker
,TaskTracker
public class OnlineDriveTaskTrackerImpl extends Object implements OnlineDriveTaskTracker
- Author:
- michalm
-
-
Constructor Summary
Constructors Constructor Description OnlineDriveTaskTrackerImpl(DvrpVehicle vehicle, VrpLeg vrpDynLeg, OnlineTrackerListener onlineTrackerListener, org.matsim.core.mobsim.framework.MobsimTimer timer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
divertPath(VrpPathWithTravelData newSubPath)
double
getCurrentLinkEnterTime()
int
getCurrentLinkIdx()
LinkTimePair
getDiversionPoint()
Assumption: vehicle is diverted as soon as possible, i.e.: if the next link can be changed: after the current link If not then, (a) if the current link is not the last one, after the next link, or (b) no diversion possible (the leg ends on the current link)VrpPath
getPath()
void
movedOverNode(org.matsim.api.core.v01.network.Link nextLink)
double
predictEndTime()
-
-
-
Constructor Detail
-
OnlineDriveTaskTrackerImpl
public OnlineDriveTaskTrackerImpl(DvrpVehicle vehicle, VrpLeg vrpDynLeg, OnlineTrackerListener onlineTrackerListener, org.matsim.core.mobsim.framework.MobsimTimer timer)
-
-
Method Detail
-
getPath
public VrpPath getPath()
- Specified by:
getPath
in interfaceOnlineDriveTaskTracker
-
getCurrentLinkIdx
public int getCurrentLinkIdx()
- Specified by:
getCurrentLinkIdx
in interfaceOnlineDriveTaskTracker
-
getCurrentLinkEnterTime
public double getCurrentLinkEnterTime()
- Specified by:
getCurrentLinkEnterTime
in interfaceOnlineDriveTaskTracker
-
movedOverNode
public void movedOverNode(org.matsim.api.core.v01.network.Link nextLink)
- Specified by:
movedOverNode
in interfaceOnlineDriveTaskTracker
-
getDiversionPoint
public LinkTimePair getDiversionPoint()
Assumption: vehicle is diverted as soon as possible, i.e.:- if the next link can be changed: after the current link
- If not then, (a) if the current link is not the last one, after the next link, or
- (b) no diversion possible (the leg ends on the current link)
- Specified by:
getDiversionPoint
in interfaceOnlineDriveTaskTracker
-
divertPath
public void divertPath(VrpPathWithTravelData newSubPath)
- Specified by:
divertPath
in interfaceOnlineDriveTaskTracker
-
predictEndTime
public double predictEndTime()
- Specified by:
predictEndTime
in interfaceTaskTracker
-
-