Skip to content

Improve local search aborts based on incompatibilities #281

@jcoupey

Description

@jcoupey

We store various incompatibilities between vehicles and jobs (based on skills and other constraints) for constant-time lookup through Input::vehicle_ok_with_job. This used to allow early aborts for many operators during local search as compatibility is typically checked first place in cvrp::OperatorName::is_valid.

Now since #266 has been implemented, most validity checks happen after gain computations. So for a local search move with an obvious incompatibility between job and vehicle we still create the operator and call compute_gain while the following is_valid call is bound to fail.

We should ensure LS operators expect compatibility to be checked before-hand (maybe assert it for debugging), while moving all such checks to LocalSearch::run_ls_step, resulting in earlier aborts for obvious incompatibilities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions