Configuration for calculating a granular neighbourhood.
Attributes
weight_wait_time- Penalty weight given to the minimum wait time aspect of the proximity calculation. A large wait time indicates the clients are far apart in duration/time.weight_time_warp- Penalty weight given to the minimum time warp aspect of the proximity calculation. A large time warp indicates the clients are far apart in duration/time.num_neighbours- Number of other clients that are in each client's granular neighbourhood. This parameter determines the size of the overall neighbourhood.symmetric_proximity- Whether to calculate a symmetric proximity matrix. This ensures edge (i, j) is given the same weight as (j, i).symmetric_neighbours- Whether to symmetrise the neighbourhood structure. This ensures that when edge (i, j) is in, then so is (j, i). Note that this is not the same assymmetric_proximity.
Example
iex> params = ExVrp.NeighbourhoodParams.new()
iex> params.weight_wait_time
0.2
iex> params.num_neighbours
60
iex> params = ExVrp.NeighbourhoodParams.new(num_neighbours: 40)
iex> params.num_neighbours
40
Summary
Functions
Creates a new NeighbourhoodParams with the given options.
Types
@type t() :: %ExVrp.NeighbourhoodParams{ num_neighbours: pos_integer(), symmetric_neighbours: boolean(), symmetric_proximity: boolean(), weight_time_warp: float(), weight_wait_time: float() }
Functions
Creates a new NeighbourhoodParams with the given options.
Options
:weight_wait_time- Penalty weight for wait time (default: 0.2):weight_time_warp- Penalty weight for time warp (default: 1.0):num_neighbours- Number of neighbours per client (default: 60):symmetric_proximity- Symmetrize proximity matrix (default: true):symmetric_neighbours- Symmetrize neighbourhood structure (default: false)
Raises
ArgumentErrorwhennum_neighboursis non-positive.
Examples
iex> ExVrp.NeighbourhoodParams.new()
%ExVrp.NeighbourhoodParams{
weight_wait_time: 0.2,
weight_time_warp: 1.0,
num_neighbours: 60,
symmetric_proximity: true,
symmetric_neighbours: false
}
iex> ExVrp.NeighbourhoodParams.new(num_neighbours: 40, symmetric_neighbours: true)
%ExVrp.NeighbourhoodParams{
weight_wait_time: 0.2,
weight_time_warp: 1.0,
num_neighbours: 40,
symmetric_proximity: true,
symmetric_neighbours: true
}