20#include "absl/strings/str_cat.h" 
   29constexpr absl::string_view kLimitsTime = 
"limits/time";
 
   30constexpr absl::string_view kParallelMaxNThreads = 
"parallel/maxnthreads";
 
   31constexpr absl::string_view kDisplayVerbLevel = 
"display/verblevel";
 
   32constexpr absl::string_view kRandomSeedParam = 
"randomization/randomseedshift";
 
   33constexpr absl::string_view kCatchCtrlCParam = 
"misc/catchctrlc";
 
   46  if (parameters.
real_params().contains(std::string(kLimitsTime))) {
 
   47    const double scip_limit =
 
   48        parameters.
real_params().at(std::string(kLimitsTime));
 
   49    if (scip_limit >= 1e20) {
 
   50      return absl::InfiniteDuration();
 
   51    } 
else if (scip_limit <= 0.0) {
 
   52      return absl::ZeroDuration();
 
   54      return absl::Seconds(scip_limit);
 
   57  return absl::InfiniteDuration();
 
 
   61  return parameters.
real_params().contains(std::string(kLimitsTime));
 
 
   65  CHECK_GE(num_threads, 1);
 
 
   71  if (parameters.
int_params().contains(std::string(kParallelMaxNThreads))) {
 
   72    return parameters.
int_params().at(std::string(kParallelMaxNThreads));
 
 
   78  return parameters.
int_params().contains(std::string(kParallelMaxNThreads));
 
 
   82  CHECK_GE(log_level, 0);
 
   83  CHECK_LE(log_level, 5);
 
 
   89  return parameters.
int_params().contains(std::string(kDisplayVerbLevel))
 
   90             ? parameters.
int_params().at(std::string(kDisplayVerbLevel))
 
 
   94  return parameters.
int_params().contains(std::string(kDisplayVerbLevel));
 
 
  105  return !parameters.
int_params().contains(std::string(kDisplayVerbLevel)) ||
 
  106         (parameters.
int_params().at(std::string(kDisplayVerbLevel)) > 0);
 
 
  114  random_seed = std::max(0, random_seed);
 
 
  121    return parameters.
int_params().at(std::string(kRandomSeedParam));
 
 
  127  return parameters.
int_params().contains(std::string(kRandomSeedParam));
 
 
  138    return parameters.
bool_params().at(std::string(kCatchCtrlCParam));
 
 
  144  return parameters.
bool_params().contains(std::string(kCatchCtrlCParam));
 
 
  152  const std::vector<std::string> scip_separators = {
 
  153      "cgmip",         
"clique",        
"closecuts",   
"flowcover", 
"cmir",
 
  154      "aggregation",   
"convexproj",    
"disjunctive", 
"eccuts",    
"gauge",
 
  155      "gomory",        
"impliedbounds", 
"intobj",      
"mcf",       
"oddcycle",
 
  156      "rapidlearning", 
"strongcg",      
"zerohalf"};
 
  157  for (
const std::string& separator : scip_separators) {
 
  158    const std::string separator_parameter =
 
  159        absl::StrCat(
"separating/", separator, 
"/freq");
 
 
::google::protobuf::Map< std::string, bool > *PROTOBUF_NONNULL mutable_bool_params()
 
const ::google::protobuf::Map< std::string, ::int32_t > & int_params() const
 
::google::protobuf::Map< std::string, ::int32_t > *PROTOBUF_NONNULL mutable_int_params()
 
const ::google::protobuf::Map< std::string, double > & real_params() const
 
const ::google::protobuf::Map< std::string, bool > & bool_params() const
 
::google::protobuf::Map< std::string, double > *PROTOBUF_NONNULL mutable_real_params()
 
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 ¶meters)
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 ¶meters)
 
bool GScipOutputEnabled(const GScipParameters ¶meters)
Checks if the log level is equal to zero.
 
bool GScipLogLevelSet(const GScipParameters ¶meters)
 
bool GScipRandomSeedSet(const GScipParameters ¶meters)
 
bool GScipMaxNumThreadsSet(const GScipParameters ¶meters)
 
bool GScipOutputEnabledSet(const GScipParameters ¶meters)
 
void DisableAllCutsExceptUserDefined(GScipParameters *parameters)
Turns off all SCIP separators.
 
int GScipRandomSeed(const GScipParameters ¶meters)
Returns -1 if unset.
 
int GScipMaxNumThreads(const GScipParameters ¶meters)
Returns 1 if the number of threads it not specified.
 
bool GScipCatchCtrlC(const GScipParameters ¶meters)
 
void GScipSetLogLevel(GScipParameters *parameters, int log_level)
 
absl::Duration GScipTimeLimit(const GScipParameters ¶meters)
 
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 ¶meters)