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
6// http://www.apache.org/licenses/LICENSE-2.0
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.
14// This file contains protocol buffers for all parameters of the CP solver.
18option java_package = "com.google.ortools.constraintsolver";
19option java_multiple_files = true;
20option csharp_namespace = "Google.OrTools.ConstraintSolver";
22package operations_research;
25message ConstraintSolverParameters {
27 // Internal parameters of the solver.
29 enum TrailCompression {
31 COMPRESS_WITH_ZLIB = 1;
34 // This parameter indicates if the solver should compress the trail
35 // during the search. No compression means that the solver will be faster,
36 // but will use more memory.
37 TrailCompression compress_trail = 1;
39 // This parameter indicates the default size of a block of the trail.
40 // Compression applies at the block level.
41 int32 trail_block_size = 2;
43 // When a sum/min/max operation is applied on a large array, this
44 // array is recursively split into blocks of size 'array_split_size'.
45 int32 array_split_size = 3;
48 // Control naming of the variables..
51 // This parameters indicates if the solver should store the names of
52 // the objets it manages.
55 // Create names for cast variables.
56 bool name_cast_variables = 5;
58 // Should anonymous variables be given a name.
59 bool name_all_variables = 6;
62 // Control monitoring of the solver and the model.
65 // Activate propagation profiling.
66 bool profile_propagation = 7;
68 // Export propagation profiling data to file.
69 string profile_file = 8;
71 // Activate local search profiling.
72 bool profile_local_search = 16;
74 // Print local search profiling data after solving.
75 bool print_local_search_profile = 17;
77 // Activate propagate tracing.
78 bool trace_propagation = 9;
81 bool trace_search = 10;
83 // Print the model before solving.
84 bool print_model = 11;
86 // Print model statistics before solving.
87 bool print_model_stats = 12;
89 // Print added constraints.
90 bool print_added_constraints = 13;
98 bool disable_solve = 15;
100 // The following flags are meant for internal use only.
103 // Control the implementation of the table constraint.
105 bool use_small_table = 101;
106 reserved 100, 102, 103, 104;
109 // Control the propagation of the cumulative constraint.
111 bool use_cumulative_edge_finder = 105;
112 bool use_cumulative_time_table = 106;
113 bool use_cumulative_time_table_sync = 112;
114 bool use_sequence_high_demand_tasks = 107;
115 bool use_all_possible_disjunctions = 108;
116 int32 max_edge_finder_size = 109;
119 // Control the propagation of the diffn constraint.
121 bool diffn_use_cumulative = 110;
124 // Control the implementation of the element constraint.
126 bool use_element_rmq = 111;
129 // Skip locally optimal pairs of paths in PathOperators. Setting this
130 // parameter to true might skip valid neighbors if there are constraints
131 // linking paths together (such as precedences). In any other case this
132 // should only speed up the search without omitting any neighbors.
134 bool skip_locally_optimal_paths = 113;
137 // Control the behavior of local search.
139 int32 check_solution_period = 114;