Package org.matsim.core.router.util
Interface TravelDisutility
-
- All Known Implementing Classes:
FreespeedTravelTimeAndDisutility
,OnlyTimeDependentTravelDisutility
public interface TravelDisutility
A simple interface to retrieve the disutility to travel on links. Design comments:- If I understand this correctly, implementations of this interface need to be thread-safe, since the same code may be called from different threads simultaneously. If I understand this correctly, this can only be achieved by never writing to fields in any methods besides the constructor. kai, jan'13
tutorial.programming.randomizingRouter.RunRandomizingRouterExample
for an example.- Author:
- mrieser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getLinkMinimumTravelDisutility(Link link)
double
getLinkTravelDisutility(Link link, double time, Person person, Vehicle vehicle)
Returns the disutility to travel on the specified link at the specified time.
-
-
-
Method Detail
-
getLinkTravelDisutility
double getLinkTravelDisutility(Link link, double time, Person person, Vehicle vehicle)
Returns the disutility to travel on the specified link at the specified time.- Parameters:
link
- The link for which the travel disutility is calculated.time
- The departure time (in seconds since 00:00) at the beginning of the link for which the disutility is calculated.person
- The person that wants to travel along the link. Note that this parameter can benull
!vehicle
- The vehicle with which the person wants to travel along the link. Note that this parameter can benull
!- Returns:
- The disutility to travel over the link
link
, departing at timetime
.
-
getLinkMinimumTravelDisutility
double getLinkMinimumTravelDisutility(Link link)
- Parameters:
link
- the link for which the minimal travel disutility over all time slots is calculated- Returns:
- Minimal costs to travel over the link
link
, departing at timetime
-
-