Files
2026-01-16 19:20:19 +08:00

81 lines
2.8 KiB
Protocol Buffer

// Copyright 2010-2021 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Protocol buffer used to store search statistics.
syntax = "proto3";
option java_package = "com.google.ortools.constraintsolver";
option java_multiple_files = true;
option csharp_namespace = "Google.OrTools.ConstraintSolver";
package operations_research;
// Statistics on local search.
message LocalSearchStatistics {
// Statistics on local search operators called during the search.
message LocalSearchOperatorStatistics {
// Name of the operator.
string local_search_operator = 1;
// Number of neighbors generated by the operator.
int64 num_neighbors = 2;
// Number of neighbors which were filtered.
int64 num_filtered_neighbors = 3;
// Number of neighbors eventually accepted.
int64 num_accepted_neighbors = 4;
// Time spent in the operator.
double duration_seconds = 5;
}
// Statistics for each operator called during the search.
repeated LocalSearchOperatorStatistics local_search_operator_statistics = 1;
// Statistics on local search filters called during the search.
message LocalSearchFilterStatistics {
// Name of the filter.
string local_search_filter = 1;
// Number of times the filter was called.
int64 num_calls = 2;
// Number of times the filter rejected a neighbor.
int64 num_rejects = 3;
// Time spent in the filter.
double duration_seconds = 4;
}
// Statistics for each filter called during the search.
repeated LocalSearchFilterStatistics local_search_filter_statistics = 2;
// Total number of (filtered/accepted) neighbors created during the search.
int64 total_num_neighbors = 3;
int64 total_num_filtered_neighbors = 4;
int64 total_num_accepted_neighbors = 5;
}
// Statistics on the search in the constraint solver.
message ConstraintSolverStatistics {
// Number of branches explored.
int64 num_branches = 1;
// Number of failures/backtracks.
int64 num_failures = 2;
// Number of solutions found.
int64 num_solutions = 3;
// Memory usage of the solver.
int64 bytes_used = 4;
// Time spent in the filter.
double duration_seconds = 5;
}
// Search statistics.
message SearchStatistics {
// Local search statistics.
LocalSearchStatistics local_search_statistics = 1;
// Constraint solver statistics.
ConstraintSolverStatistics constraint_solver_statistics = 2;
}