Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
search_stats.proto
Go to the documentation of this file.
1// Copyright 2010-2025 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 store search statistics.
15
16syntax = "proto3";
17
18option java_package = "com.google.ortools.constraintsolver";
19option java_multiple_files = true;
20option csharp_namespace = "Google.OrTools.ConstraintSolver";
21
22package operations_research;
23
24// Statistics on local search.
25message LocalSearchStatistics {
26 // First solution statistics collected during search.
27 message FirstSolutionStatistics {
28 // Name of the strategy used.
29 string strategy = 1;
30 // Time spent in the decision builder.
31 double duration_seconds = 2;
32 }
33 // Statistics for each first solution called during the search.
34 repeated FirstSolutionStatistics first_solution_statistics = 6;
35 // Statistics on local search operators called during the search.
36 message LocalSearchOperatorStatistics {
37 // Name of the operator.
38 string local_search_operator = 1;
39 // Number of neighbors generated by the operator.
40 int64 num_neighbors = 2;
41 // Number of neighbors which were filtered.
42 int64 num_filtered_neighbors = 3;
43 // Number of neighbors eventually accepted.
44 int64 num_accepted_neighbors = 4;
45 // Time spent in the operator.
46 double duration_seconds = 5;
47 // Time spent in creating neighbors (calling MakeNextNeighbor).
48 double make_next_neighbor_duration_seconds = 6;
49 // Time spent in accepting a neighbor (restoration and storage, not
50 // including filtering).
51 double accept_neighbor_duration_seconds = 7;
52 }
53 // Statistics for each operator called during the search.
54 repeated LocalSearchOperatorStatistics local_search_operator_statistics = 1;
55 // Total number of (filtered/accepted) neighbors created during the search.
56 int64 total_num_neighbors = 3;
57 int64 total_num_filtered_neighbors = 4;
58 int64 total_num_accepted_neighbors = 5;
59 // Statistics on local search filters called during the search.
60 message LocalSearchFilterStatistics {
61 // Name of the filter.
62 string local_search_filter = 1;
63 // Number of times the filter was called.
64 int64 num_calls = 2;
65 // Number of times the filter rejected a neighbor.
66 int64 num_rejects = 3;
67 // Time spent in the filter.
68 double duration_seconds = 4;
69 // Number of rejects per second.
70 double num_rejects_per_second = 5;
71 // Context within which the filter was called.
72 string context = 6;
73 }
74 // Statistics for each filter called during the search.
75 repeated LocalSearchFilterStatistics local_search_filter_statistics = 2;
76}
77
78// Statistics on the search in the constraint solver.
79message ConstraintSolverStatistics {
80 // Number of branches explored.
81 int64 num_branches = 1;
82 // Number of failures/backtracks.
83 int64 num_failures = 2;
84 // Number of solutions found.
85 int64 num_solutions = 3;
86 // Memory usage of the solver.
87 int64 bytes_used = 4;
88 // Total time spent in the solver.
89 double duration_seconds = 5;
90}
91
92// Search statistics.
93message SearchStatistics {
94 // Local search statistics for each solver context.
95 repeated LocalSearchStatistics local_search_statistics = 1;
96 // Constraint solver statistics.
97 repeated ConstraintSolverStatistics constraint_solver_statistics = 2;
98}