14#ifndef OR_TOOLS_CONSTRAINT_SOLVER_ROUTING_ILS_H_
15#define OR_TOOLS_CONSTRAINT_SOLVER_ROUTING_ILS_H_
25#include "ortools/constraint_solver/routing_parameters.pb.h"
34 virtual std::function<int64_t(int64_t)>
Ruin(
46 std::function<int64_t(int64_t)>
Ruin(
const Assignment* assignment)
override;
50 bool HasPerformedNodes(
const Assignment* assignment);
52 const RoutingModel& model_;
53 const RoutingModel::NodeNeighborsByCostClass*
const neighbors_manager_;
54 const size_t num_routes_;
56 std::uniform_int_distribution<int64_t> customer_dist_;
64 const Assignment* assignment, std::function<
bool()> stop_search,
Remove a number of routes that are spatially close together.
CloseRoutesRemovalRuinProcedure(RoutingModel *model, size_t num_routes)
std::function< int64_t(int64_t)> Ruin(const Assignment *assignment) override
Neighbor acceptance criterion interface.
virtual ~NeighborAcceptanceCriterion()=default
virtual bool Accept(const Assignment *candidate, const Assignment *reference) const =0
Returns whether candidate should replace reference.
virtual ~RuinProcedure()=default
virtual std::function< int64_t(int64_t)> Ruin(const Assignment *assignment)=0
In SWIG mode, we don't want anything besides these top-level includes.
std::unique_ptr< NeighborAcceptanceCriterion > MakeNeighborAcceptanceCriterion(const RoutingSearchParameters ¶meters)
Returns a neighbor acceptance criterion based on the given parameters.
DecisionBuilder * MakePerturbationDecisionBuilder(const RoutingSearchParameters ¶meters, RoutingModel *model, const Assignment *assignment, std::function< bool()> stop_search, LocalSearchFilterManager *filter_manager)