public class VehicleRoutingProblemSolution extends Object
| Constructor and Description |
|---|
VehicleRoutingProblemSolution(Collection<VehicleRoute> routes,
Collection<Job> unassignedJobs,
double cost)
Constructs a solution with a number of
VehicleRoutes, bad jobs and their corresponding aggregate cost value. |
VehicleRoutingProblemSolution(Collection<VehicleRoute> routes,
double cost)
Constructs a solution with a number of
VehicleRoutes and their corresponding aggregate cost value. |
| Modifier and Type | Method and Description |
|---|---|
static VehicleRoutingProblemSolution |
copyOf(VehicleRoutingProblemSolution solution2copy)
Makes a deep copy of the solution to be copied.
|
double |
getCost()
Returns cost of this solution.
|
Collection<VehicleRoute> |
getRoutes()
Returns a collection of vehicle-routes.
|
Collection<Job> |
getUnassignedJobs()
Returns bad jobs, i.e.
|
void |
setCost(double cost)
Sets the costs of this solution.
|
String |
toString() |
public VehicleRoutingProblemSolution(Collection<VehicleRoute> routes, double cost)
VehicleRoutes and their corresponding aggregate cost value.routes - routes being part of the solutioncost - total costs of solutionpublic VehicleRoutingProblemSolution(Collection<VehicleRoute> routes, Collection<Job> unassignedJobs, double cost)
VehicleRoutes, bad jobs and their corresponding aggregate cost value.routes - routes being part of the solutionunassignedJobs - jobs that could not be assigned to any vehiclecost - total costs of solutionpublic static VehicleRoutingProblemSolution copyOf(VehicleRoutingProblemSolution solution2copy)
solution2copy - solution to be copiedpublic Collection<VehicleRoute> getRoutes()
public double getCost()
public void setCost(double cost)
cost - the cost to assigned to this solutionpublic Collection<Job> getUnassignedJobs()
Copyright © 2013–2024. All rights reserved.