Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
routing_ils.proto
Go to the documentation of this file.
1// Copyright 2010-2024 Google LLC
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14// Protocol buffer used to parametrize an iterated local search (ILS) approach.
15// ILS is an iterative metaheuristic in which every iteration consists in
16// performing a perturbation followed by an improvement step on a reference
17// solution to generate a neighbor solution.
18// The neighbor solution is accepted as the new reference solution according
19// to an acceptance criterion.
20// The best found solution is eventually returned.
21
22syntax = "proto3";
23
24import "ortools/constraint_solver/routing_enums.proto";
25
26package operations_research;
27
28// Ruin strategies, used in perturbation based on ruin and recreate approaches.
29message RuinStrategy {
30 enum Value {
31 // Unspecified value.
32 UNSET = 0;
33
34 // Removes a number of spatially close routes.
35 SPATIALLY_CLOSE_ROUTES_REMOVAL = 1;
36 }
37}
38
39// Parameters to configure a perturbation based on a ruin and recreate approach.
40message RuinRecreateParameters {
41 // Strategy defining how a reference solution is ruined.
42 RuinStrategy.Value ruin_strategy = 1;
43
44 // Strategy defining how a reference solution is recreated.
45 FirstSolutionStrategy.Value recreate_strategy = 2;
46
47 // Number of routes removed during a ruin application defined on routes.
48 uint32 num_ruined_routes = 3;
49}
50
51// Defines how a reference solution is perturbed.
52message PerturbationStrategy {
53 enum Value {
54 // Unspecified value.
55 UNSET = 0;
56
57 // Performs a perturbation in a ruin and recreate fashion.
58 RUIN_AND_RECREATE = 1;
59 }
60}
61
62// Determines when a neighbor solution, obtained by the application of a
63// perturbation and improvement step to a reference solution, is used to
64// replace the reference solution.
65message AcceptanceStrategy {
66 enum Value {
67 // Unspecified value.
68 UNSET = 0;
69
70 // Accept only solutions that are improving with respect to the reference
71 // one.
72 GREEDY_DESCENT = 1;
73 }
74}
75
76// Specifies the behavior of a search based on ILS.
77message IteratedLocalSearchParameters {
78 // Determines how a reference solution S is perturbed to obtain a neighbor
79 // solution S'.
80 PerturbationStrategy.Value perturbation_strategy = 1;
81
82 // Parameters to customize a ruin and recreate perturbation.
83 RuinRecreateParameters ruin_recreate_parameters = 2;
84
85 // Determines whether solution S', obtained from the perturbation, should be
86 // optimized with a local search application.
87 bool improve_perturbed_solution = 3;
88
89 // Determines when the neighbor solution S', possibly improved if
90 // `improve_perturbed_solution` is true, replaces the reference solution S.
91 AcceptanceStrategy.Value acceptance_strategy = 4;
92}