Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
gscip_parameters.h
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#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
20namespace operations_research {
21
22void GScipSetTimeLimit(absl::Duration time_limit, GScipParameters* parameters);
23absl::Duration GScipTimeLimit(const GScipParameters& parameters);
24bool GScipTimeLimitSet(const GScipParameters& parameters);
25
26// CHECK fails if num_threads < 1.
27void GScipSetMaxNumThreads(int num_threads, GScipParameters* parameters);
28
29// Returns 1 if the number of threads it not specified.
30int GScipMaxNumThreads(const GScipParameters& parameters);
31bool 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.
36void GScipSetLogLevel(GScipParameters* parameters, int log_level);
37int GScipLogLevel(const GScipParameters& parameters);
38bool GScipLogLevelSet(const GScipParameters& parameters);
39
40// Sets the log level to 4 if enabled, 0 if disabled (see above).
41void GScipSetOutputEnabled(GScipParameters* parameters, bool output_enabled);
42// Checks if the log level is equal to zero.
43bool GScipOutputEnabled(const GScipParameters& parameters);
44bool 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.
49void GScipSetRandomSeed(GScipParameters* parameters, int random_seed);
50// Returns -1 if unset.
51int GScipRandomSeed(const GScipParameters& parameters);
52bool GScipRandomSeedSet(const GScipParameters& parameters);
53
54// Sets the misc/catchctrlc property.
55void GScipSetCatchCtrlC(bool catch_ctrl_c, GScipParameters* parameters);
56// Returns the misc/catchctrlc property; true if not set (the default SCIP
57// behavior).
58bool GScipCatchCtrlC(const GScipParameters& parameters);
59// Returns true when the misc/catchctrlc property is set.
60bool GScipCatchCtrlCSet(const GScipParameters& parameters);
61
62// Turns off all SCIP separators.
63void DisableAllCutsExceptUserDefined(GScipParameters* parameters);
64
65} // namespace operations_research
66
67#endif // OR_TOOLS_GSCIP_GSCIP_PARAMETERS_H_
SatParameters parameters
time_limit
Definition solve.cc:22
In SWIG mode, we don't want anything besides these top-level includes.
void GScipSetOutputEnabled(GScipParameters *parameters, bool output_enabled)
Sets the log level to 4 if enabled, 0 if disabled (see above).
void GScipSetRandomSeed(GScipParameters *parameters, int random_seed)
bool GScipCatchCtrlCSet(const GScipParameters &parameters)
Returns true when the misc/catchctrlc property is set.
void GScipSetCatchCtrlC(const bool catch_ctrl_c, GScipParameters *const parameters)
Sets the misc/catchctrlc property.
bool GScipTimeLimitSet(const GScipParameters &parameters)
bool GScipOutputEnabled(const GScipParameters &parameters)
Checks if the log level is equal to zero.
bool GScipLogLevelSet(const GScipParameters &parameters)
bool GScipRandomSeedSet(const GScipParameters &parameters)
bool GScipMaxNumThreadsSet(const GScipParameters &parameters)
bool GScipOutputEnabledSet(const GScipParameters &parameters)
void DisableAllCutsExceptUserDefined(GScipParameters *parameters)
Turns off all SCIP separators.
int GScipRandomSeed(const GScipParameters &parameters)
Returns -1 if unset.
int GScipMaxNumThreads(const GScipParameters &parameters)
Returns 1 if the number of threads it not specified.
bool GScipCatchCtrlC(const GScipParameters &parameters)
void GScipSetLogLevel(GScipParameters *parameters, int log_level)
absl::Duration GScipTimeLimit(const GScipParameters &parameters)
void GScipSetMaxNumThreads(int num_threads, GScipParameters *parameters)
CHECK fails if num_threads < 1.
void GScipSetTimeLimit(absl::Duration time_limit, GScipParameters *parameters)
int GScipLogLevel(const GScipParameters &parameters)