google / google/or-tools

Python: Add support for sweep arranger for the ROUTING_SWEEP strategy.

Open
#3,593 1 comment 0 reactions 1 assignee Claimed by @Mizux View on GitHub
Feature Request Help Needed Solver: Routing
Dominant language
C++
Stars
14.1k
Forks
2.5k
Avg merge
8h 39m
Merged PRs (30d)
72

Description

I am trying to set First Solution as SWEEP to be able to get the optimizer running with cluster of nearby drop point instead of having expanding tree.

```py
# Setting first solution heuristic.
search_parameters = pywrapcp.DefaultRoutingSearchParameters()
search_parameters.first_solution_strategy = (
routing_enums_pb2.FirstSolutionStrategy.SWEEP)

# # Setting first solution heuristic.
# routing_enums_pb2.FirstSolutionStrategy.PATH_CHEAPEST_ARC)
search_parameters.local_search_metaheuristic = (
routing_enums_pb2.LocalSearchMetaheuristic.GUIDED_LOCAL_SEARCH)
```

However, I encounter this error
Invalid RoutingSearchParameters for this model: Undefined sweep arranger for ROUTING_SWEEP strategy.

Is there another way to have cluster of point server by the same route ?
![image (4)](https://user-images.githubusercontent.com/81554819/207245831-139e8e1d-17a9-4587-8ea7-d9b7b71948c4.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.