Skip to content

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

@NathanNguyen-Dev

Description

@NathanNguyen-Dev

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.

 # 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)

Metadata

Metadata

Assignees

Labels

Feature RequestMissing Feature/WrapperHelp NeededModeling/Usage problemSolver: RoutingUses the Routing library and the original CP solver

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions