Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package rinde.sim.pdptw.central.arrays;
 import  javax.annotation.Nullable;

Interface for solvers for the single vehicle pickup-and-delivery problem with time windows (SPDPTW). This interface uses int arrays for specification of the inputs and outputs.

Note that usage of this interface is not recommended. The rinde.sim.pdptw.central.Solver interface provides exactly the same functionality but in a type safe manner.

Rinde van Lon <>
public interface SingleVehicleArraysSolver {

Gives a solution for the single vehicle PDPTW as specified by the parameters. The returned solution does not necessarily need to be optimal but it needs to be feasible. The ArraysSolverValidator can check whether a SingleVehicleArraysSolver produces a valid solution and it can check whether the parameters for the SingleVehicleArraysSolver are valid.

All times are in units relative to the current time (0). All constraints are soft, i.e. lateness at service locations and at depot are allowed. The start location has index 0, the end location (depot) has index n-1.

travelTime n x n distance matrix expressed in time: travelTime[i][j] specifies travelTime from location i to location j.
releaseDates specifies the left side of the time window for every location (hard constraint, earlier is not allowed).
dueDates specifies the right side of the time window for every location (soft constraint, lateness is allowed).
servicePairs n x 2 matrix of service location pairs, servicePairs[i][0] and servicePairs[i][1] specify the pickup and delivery location respectively. Each location may occur at maximum once in the matrix (either as an pickup or as a delivery).
serviceTimes specifies the service time for all locations (both pickups and deliveries).
currentSolution If defined it contains the current route of the vehicle. This can be used as a starting point for a new solution. If any new parcels have become known since this current solution was computed these parcels will not be part of the solutions. This means that these solutions may not be feasible solutions and thus require adaptation.
The solution object which indicates a (usually the best found) solution for the single vehicle PDPTW.
  SolutionObject solve(int[][] travelTimeint[] releaseDatesint[] dueDates,
      int[][] servicePairsint[] serviceTimes,
      @Nullable SolutionObject currentSolution);
New to GrepCode? Check out our FAQ X