Fleet minimisation for VRP instances.
Attempts to reduce the number of vehicles needed to achieve a feasible solution to the given problem instance, subject to a stopping criterion.
Warning
This function is currently unable to solve instances with multiple vehicle types. Support for such a setting may be added in future versions.
Summary
Functions
Attempts to reduce the number of vehicles needed to achieve a feasible solution to the given problem instance.
Same as minimise/3 but raises on error.
Functions
@spec minimise(ExVrp.Model.t(), ExVrp.StoppingCriteria.t(), keyword()) :: {:ok, ExVrp.VehicleType.t()} | {:error, String.t()}
Attempts to reduce the number of vehicles needed to achieve a feasible solution to the given problem instance.
Parameters
model- The VRP model with a given vehicle compositionstop- Stopping criterion that determines how much effort to spendopts- Options::seed- Seed value for RNG (default: 0)
Returns
Returns {:ok, vehicle_type} with the smallest fleet composition that
admits a feasible solution, or {:error, reason} if validation fails.
Raises
Returns an error when the instance contains more than one vehicle type or when the instance contains optional clients.
Examples
{:ok, vehicle_type} = MinimiseFleet.minimise(model, StoppingCriteria.max_iterations(100))
@spec minimise!(ExVrp.Model.t(), ExVrp.StoppingCriteria.t(), keyword()) :: ExVrp.VehicleType.t()
Same as minimise/3 but raises on error.