Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::RandomWalkRemovalRuinProcedure Class Reference

#include <routing_ils.h>

Inheritance diagram for operations_research::RandomWalkRemovalRuinProcedure:
operations_research::RuinProcedure

Public Member Functions

 RandomWalkRemovalRuinProcedure (RoutingModel *model, std::mt19937 *rnd, int walk_length, int num_neighbors_for_route_selection)
 
std::function< int64_t(int64_t)> Ruin (const Assignment *assignment) override
 Returns next accessors describing the ruined solution.
 
- Public Member Functions inherited from operations_research::RuinProcedure
virtual ~RuinProcedure ()=default
 

Detailed Description

Removes a number of non start/end nodes by performing a random walk on the routing solution graph described by the assignment.

Note
the removal of a pickup and delivery counts as the removal of a single entity.

Definition at line 135 of file routing_ils.h.

Constructor & Destructor Documentation

◆ RandomWalkRemovalRuinProcedure()

operations_research::RandomWalkRemovalRuinProcedure::RandomWalkRemovalRuinProcedure ( RoutingModel * model,
std::mt19937 * rnd,
int walk_length,
int num_neighbors_for_route_selection )

Definition at line 801 of file routing_ils.cc.

Member Function Documentation

◆ Ruin()

std::function< int64_t(int64_t)> operations_research::RandomWalkRemovalRuinProcedure::Ruin ( const Assignment * assignment)
overridevirtual

Returns next accessors describing the ruined solution.

Remove the active siblings node of curr before selecting next, so that we do not accidentally end up with next being one of these sibling nodes.

We were not able to find a vertex where to move next. We thus prematurely abort the ruin.

Implements operations_research::RuinProcedure.

Definition at line 815 of file routing_ils.cc.


The documentation for this class was generated from the following files: