mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
introduce AbstractForward...Costs to simplify cost-def
This commit is contained in:
parent
b21eebdc26
commit
7ec9786c2b
1 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
||||||
|
package jsprit.core.problem.cost;
|
||||||
|
|
||||||
|
import jsprit.core.problem.driver.Driver;
|
||||||
|
import jsprit.core.problem.vehicle.Vehicle;
|
||||||
|
|
||||||
|
public abstract class AbstractForwardVehicleRoutingTransportCosts implements VehicleRoutingTransportCosts{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public abstract double getTransportTime(String fromId, String toId,double departureTime, Driver driver, Vehicle vehicle);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public abstract double getTransportCost(String fromId, String toId,double departureTime, Driver driver, Vehicle vehicle);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getBackwardTransportTime(String fromId, String toId,double arrivalTime, Driver driver, Vehicle vehicle) {
|
||||||
|
return getTransportTime(fromId, toId, arrivalTime, driver, vehicle);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getBackwardTransportCost(String fromId, String toId,double arrivalTime, Driver driver, Vehicle vehicle) {
|
||||||
|
return getTransportCost(fromId, toId, arrivalTime, driver, vehicle);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue