OR-Tools  8.1
gscip_parameters.h
Go to the documentation of this file.
1 // Copyright 2010-2018 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 #ifndef OR_TOOLS_GSCIP_GSCIP_PARAMETERS_H_
15 #define OR_TOOLS_GSCIP_GSCIP_PARAMETERS_H_
16 
17 #include "absl/time/time.h"
18 #include "ortools/gscip/gscip.pb.h"
19 
20 namespace operations_research {
21 
22 void GScipSetTimeLimit(absl::Duration time_limit, GScipParameters* parameters);
23 absl::Duration GScipTimeLimit(const GScipParameters& parameters);
24 bool GScipTimeLimitSet(const GScipParameters& parameters);
25 
26 // CHECK fails if num_threads < 1.
27 void GScipSetMaxNumThreads(int num_threads, GScipParameters* parameters);
28 
29 // Returns 1 if the number of threads it not specified.
30 int GScipMaxNumThreads(const GScipParameters& parameters);
31 bool GScipMaxNumThreadsSet(const GScipParameters& parameters);
32 
33 // log_level must be in [0, 5], where 0 is none, 5 is most verbose, and the
34 // default is 4. CHECK fails on bad log_level. Default level displays standard
35 // search logs.
36 void GScipSetLogLevel(GScipParameters* parameters, int log_level);
37 int GScipLogLevel(const GScipParameters& parameters);
38 bool GScipLogLevelSet(const GScipParameters& parameters);
39 
40 // Sets the log level to 4 if enabled, 0 if disabled (see above).
41 void GScipSetOutputEnabled(GScipParameters* parameters, bool output_enabled);
42 // Checks if the log level is equal to zero.
43 bool GScipOutputEnabled(const GScipParameters& parameters);
44 bool GScipOutputEnabledSet(const GScipParameters& parameters);
45 
46 // Sets an initial seed (shift) for all pseudo-random number generators used
47 // within SCIP. Valid values are [0:INT_MAX] i.e. [0:2^31-1]. If an invalid
48 // value is passed, 0 would be stored instead.
49 void GScipSetRandomSeed(GScipParameters* parameters, int random_seed);
50 // Returns -1 if unset.
51 int GScipRandomSeed(const GScipParameters& parameters);
52 bool GScipRandomSeedSet(const GScipParameters& parameters);
53 
54 } // namespace operations_research
55 
56 #endif // OR_TOOLS_GSCIP_GSCIP_PARAMETERS_H_
operations_research::GScipRandomSeedSet
bool GScipRandomSeedSet(const GScipParameters &parameters)
Definition: gscip_parameters.cc:120
operations_research::GScipLogLevel
int GScipLogLevel(const GScipParameters &parameters)
Definition: gscip_parameters.cc:82
operations_research
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
Definition: dense_doubly_linked_list.h:21
operations_research::GScipTimeLimitSet
bool GScipTimeLimitSet(const GScipParameters &parameters)
Definition: gscip_parameters.cc:54
operations_research::GScipTimeLimit
absl::Duration GScipTimeLimit(const GScipParameters &parameters)
Definition: gscip_parameters.cc:39
operations_research::GScipRandomSeed
int GScipRandomSeed(const GScipParameters &parameters)
Definition: gscip_parameters.cc:113
time_limit
SharedTimeLimit * time_limit
Definition: cp_model_solver.cc:2103
operations_research::GScipOutputEnabled
bool GScipOutputEnabled(const GScipParameters &parameters)
Definition: gscip_parameters.cc:98
operations_research::GScipSetLogLevel
void GScipSetLogLevel(GScipParameters *parameters, int log_level)
Definition: gscip_parameters.cc:75
operations_research::GScipLogLevelSet
bool GScipLogLevelSet(const GScipParameters &parameters)
Definition: gscip_parameters.cc:87
operations_research::GScipMaxNumThreadsSet
bool GScipMaxNumThreadsSet(const GScipParameters &parameters)
Definition: gscip_parameters.cc:71
operations_research::GScipSetOutputEnabled
void GScipSetOutputEnabled(GScipParameters *parameters, bool output_enabled)
Definition: gscip_parameters.cc:91
operations_research::GScipMaxNumThreads
int GScipMaxNumThreads(const GScipParameters &parameters)
Definition: gscip_parameters.cc:64
operations_research::GScipSetRandomSeed
void GScipSetRandomSeed(GScipParameters *parameters, int random_seed)
Definition: gscip_parameters.cc:107
operations_research::GScipSetTimeLimit
void GScipSetTimeLimit(absl::Duration time_limit, GScipParameters *parameters)
Definition: gscip_parameters.cc:30
operations_research::GScipOutputEnabledSet
bool GScipOutputEnabledSet(const GScipParameters &parameters)
Definition: gscip_parameters.cc:103
gscip.pb.h
operations_research::GScipSetMaxNumThreads
void GScipSetMaxNumThreads(int num_threads, GScipParameters *parameters)
Definition: gscip_parameters.cc:58
parameters
SatParameters parameters
Definition: cp_model_fz_solver.cc:108