discrete_optimization.pickup_vrp package
Subpackages
- discrete_optimization.pickup_vrp.builders package
- discrete_optimization.pickup_vrp.plots package
- discrete_optimization.pickup_vrp.solver package
- Submodules
- discrete_optimization.pickup_vrp.solver.lp_solver module
ConstraintHandlerOrWarmStart
LinearFlowSolver
LinearFlowSolver.convert_temporaryresults()
LinearFlowSolver.init_model()
LinearFlowSolver.init_warm_start()
LinearFlowSolver.one_visit_per_clusters()
LinearFlowSolver.one_visit_per_node()
LinearFlowSolver.problem
LinearFlowSolver.resources_constraint()
LinearFlowSolver.retrieve_current_solution()
LinearFlowSolver.retrieve_current_temporaryresult()
LinearFlowSolver.retrieve_ith_temporaryresult()
LinearFlowSolver.retrieve_solutions()
LinearFlowSolver.simple_capacity_constraint()
LinearFlowSolver.solve()
LinearFlowSolver.solve_iterative()
LinearFlowSolver.solve_one_iteration()
LinearFlowSolver.time_evolution()
LinearFlowSolverLazyConstraint
SubtourAddingConstraint
SubtourAddingConstraintCluster
TemporaryResult
build_graph_solution()
build_graph_solutions()
build_path_from_vehicle_type_flow()
build_the_cycles()
construct_edges_in_out_dict()
convert_temporaryresult_to_gpdpsolution()
rebuild_routine()
rebuild_routine_variant()
reevaluate_result()
retrieve_current_solution()
update_model()
update_model_cluster_tsp()
update_model_lazy()
- discrete_optimization.pickup_vrp.solver.lp_solver_pymip module
ConstraintHandlerOrWarmStart
LinearFlowSolver
LinearFlowSolver.convert_temporaryresults()
LinearFlowSolver.init_model()
LinearFlowSolver.one_visit_per_clusters()
LinearFlowSolver.one_visit_per_node()
LinearFlowSolver.problem
LinearFlowSolver.reapply_constraint()
LinearFlowSolver.resources_constraint()
LinearFlowSolver.retrieve_current_solution()
LinearFlowSolver.retrieve_current_temporaryresult()
LinearFlowSolver.retrieve_ith_temporaryresult()
LinearFlowSolver.retrieve_solutions()
LinearFlowSolver.simple_capacity_constraint()
LinearFlowSolver.solve()
LinearFlowSolver.solve_iterative()
LinearFlowSolver.solve_one_iteration()
LinearFlowSolver.time_evolution()
MipModelException
SubtourAddingConstraint
SubtourAddingConstraintCluster
retrieve_current_solution()
update_model()
update_model_cluster_tsp()
update_model_lazy()
- discrete_optimization.pickup_vrp.solver.ortools_solver module
FirstSolutionStrategy
FirstSolutionStrategy.ALL_UNPERFORMED
FirstSolutionStrategy.AUTOMATIC
FirstSolutionStrategy.BEST_INSERTION
FirstSolutionStrategy.CHRISTOFIDES
FirstSolutionStrategy.EVALUATOR_STRATEGY
FirstSolutionStrategy.FIRST_UNBOUND_MIN_VALUE
FirstSolutionStrategy.GLOBAL_CHEAPEST_ARC
FirstSolutionStrategy.LOCAL_CHEAPEST_ARC
FirstSolutionStrategy.LOCAL_CHEAPEST_COST_INSERTION
FirstSolutionStrategy.LOCAL_CHEAPEST_INSERTION
FirstSolutionStrategy.PARALLEL_CHEAPEST_INSERTION
FirstSolutionStrategy.PATH_CHEAPEST_ARC
FirstSolutionStrategy.PATH_MOST_CONSTRAINED_ARC
FirstSolutionStrategy.SAVINGS
FirstSolutionStrategy.SEQUENTIAL_CHEAPEST_INSERTION
FirstSolutionStrategy.SWEEP
FirstSolutionStrategy.UNSET
LocalSearchMetaheuristic
NodePosition
ORToolsGPDP
ParametersCost
RoutingMonitor
apply_cost()
convert_to_gpdpsolution()
status_description
- discrete_optimization.pickup_vrp.solver.pickup_vrp_solver module
- Module contents
Submodules
discrete_optimization.pickup_vrp.gpdp module
- class discrete_optimization.pickup_vrp.gpdp.GPDP(number_vehicle: int, nodes_transportation: Set[Hashable], nodes_origin: Set[Hashable], nodes_target: Set[Hashable], list_pickup_deliverable: List[Tuple[List[Hashable], List[Hashable]]], origin_vehicle: Dict[int, Hashable], target_vehicle: Dict[int, Hashable], resources_set: Set[str], capacities: Dict[int, Dict[str, Tuple[float, float]]], resources_flow_node: Dict[Hashable, Dict[str, float]], resources_flow_edges: Dict[Tuple[Hashable, Hashable], Dict[str, float]], distance_delta: Dict[Hashable, Dict[Hashable, float]], time_delta: Dict[Hashable, Dict[Hashable, float]], time_delta_node: Dict[Hashable, float] | None = None, coordinates_2d: Dict[Hashable, Tuple[float, float]] | None = None, clusters_dict: Dict[Hashable, Hashable] | None = None, list_pickup_deliverable_per_cluster: List[Tuple[List[Hashable], List[Hashable]]] | None = None, mandatory_node_info: Dict[Hashable, bool] | None = None, cumulative_constraints: List[Tuple[Set[Hashable], int]] | None = None, time_windows_nodes: Dict[Hashable, Tuple[int | None, int | None]] | None = None, time_windows_cluster: Dict[Hashable, Tuple[int | None, int | None]] | None = None, group_identical_vehicles: Dict[int, List[int]] | None = None, slack_time_bound_per_node: Dict[Hashable, Tuple[int, float]] | None = None, node_vehicle: Dict[Hashable, List[int]] | None = None, compute_graph: bool = False)[source]
Bases:
Problem
- MAX_VALUE = 10000000000.0
- evaluate(variable: GPDPSolution) Dict[str, float] [source]
Evaluate a given solution object for the given problem.
This method should return a dictionnary of KPI, that can be then used for mono or multiobjective optimization.
- Parameters:
variable (Solution) – the Solution object to evaluate.
Returns: Dictionnary of float kpi for the solution.
- get_attribute_register() EncodingRegister [source]
Returns how the Solution should be encoded.
Returns (EncodingRegister): content of the encoding of the solution
- get_objective_register() ObjectiveRegister [source]
Returns the objective definition.
Returns (ObjectiveRegister): object defining the objective criteria.
- get_solution_type() Type[Solution] [source]
Returns the class implementation of a Solution.
Returns (class): class object of the given Problem.
- satisfy(variable: GPDPSolution) bool [source]
Computes if a solution satisfies or not the constraints of the problem.
- Parameters:
variable – the Solution object to check satisfability
Returns (bool): boolean true if the constraints are fulfilled, false elsewhere.
- class discrete_optimization.pickup_vrp.gpdp.GPDPSolution(problem: GPDP, trajectories: Dict[int, List[Hashable]], times: Dict[Hashable, float], resource_evolution: Dict[Hashable, Dict[Hashable, List[int]]])[source]
Bases:
Solution
- change_problem(new_problem: Problem) None [source]
If relevant to the optimisation problem, change the underlying problem instance for the solution.
This method can be used to evaluate a solution for different instance of problems.
- Parameters:
new_problem (Problem) – another problem instance from which the solution can be evaluated
Returns: None
- copy() GPDPSolution [source]
Deep copy of the solution.
The copy() function should return a new object containing the same input as the current object, that respects the following expected behaviour: -y = x.copy() -if do some inplace change of y, the changes are not done in x.
Returns: a new object from which you can manipulate attributes without changing the original object.
- class discrete_optimization.pickup_vrp.gpdp.ProxyClass[source]
Bases:
object
- static from_tsp_model_gpdp(tsp_model: TSPModel2D, compute_graph: bool = False) GPDP [source]
- static from_vrp_model_to_gpdp(vrp_model: VrpProblem2D, compute_graph: bool = False) GPDP [source]
- discrete_optimization.pickup_vrp.gpdp.build_matrix_distance(problem: GPDP) ndarray[Any, dtype[float64]] [source]
- discrete_optimization.pickup_vrp.gpdp.build_matrix_time(problem: GPDP) ndarray[Any, dtype[float64]] [source]