discrete_optimization.vrp.mutation package
Submodules
discrete_optimization.vrp.mutation.mutation_vrp module
- class discrete_optimization.vrp.mutation.mutation_vrp.MutationRelocate(vrp_model: VrpProblem)[source]
Bases:
Mutation
- static build(problem: VrpProblem, solution: VrpSolution, **kwargs) MutationRelocate [source]
- mutate(solution: VrpSolution) Tuple[VrpSolution, LocalMove] [source]
- mutate_and_compute_obj(solution: VrpSolution) Tuple[VrpSolution, LocalMove, Dict[str, float]] [source]
- class discrete_optimization.vrp.mutation.mutation_vrp.MutationSwap(vrp_model: VrpProblem)[source]
Bases:
Mutation
- static build(problem: VrpProblem, solution: VrpSolution, **kwargs) MutationSwap [source]
- mutate(solution: VrpSolution) Tuple[VrpSolution, LocalMove] [source]
- mutate_and_compute_obj(solution: VrpSolution) Tuple[Solution, LocalMove, Dict[str, float]] [source]
- class discrete_optimization.vrp.mutation.mutation_vrp.MutationTwoOptVRP(vrp_model: VrpProblem, test_all: bool = False, nb_test: int | None = None, return_only_improvement: bool = False, **kwargs: Any)[source]
Bases:
Mutation
- static build(problem: VrpProblem, solution: VrpSolution, **kwargs) MutationTwoOptVRP [source]
- get_points(vehicle: int, it: int, jt: int, variable: VrpSolution) Tuple[BasicCustomer, BasicCustomer, BasicCustomer, BasicCustomer] [source]
- get_points_index(vehicle: int, it: int, jt: int, variable: VrpSolution) Tuple[int, int, int, int] [source]
- mutate(variable: VrpSolution) Tuple[VrpSolution, LocalMove] [source]
- mutate_and_compute_obj(variable: VrpSolution) Tuple[VrpSolution, LocalMove, Dict[str, float]] [source]
- node_count: int
- class discrete_optimization.vrp.mutation.mutation_vrp.RelocateMove(index_vehicle_from: int, index_vehicle_to: int, index_from: int, index_to: int)[source]
Bases:
LocalMove
- apply_local_move(solution: VrpSolution) VrpSolution [source]
- backtrack_local_move(solution: VrpSolution) VrpSolution [source]
- class discrete_optimization.vrp.mutation.mutation_vrp.SwapMove(index_vehicle_from: int, index_vehicle_to: int, index_from: int, index_to: int)[source]
Bases:
LocalMove
- apply_local_move(solution: VrpSolution) VrpSolution [source]
- backtrack_local_move(solution: VrpSolution) VrpSolution [source]