17#ifndef OR_TOOLS_MATH_OPT_CPP_PARAMETERS_H_
18#define OR_TOOLS_MATH_OPT_CPP_PARAMETERS_H_
24#include "absl/status/statusor.h"
25#include "absl/strings/string_view.h"
26#include "absl/time/time.h"
27#include "absl/types/span.h"
29#include "ortools/glop/parameters.pb.h"
30#include "ortools/gscip/gscip.pb.h"
32#include "ortools/math_opt/parameters.pb.h"
33#include "ortools/math_opt/solvers/gurobi.pb.h"
34#include "ortools/math_opt/solvers/highs.pb.h"
35#include "ortools/pdlp/solvers.pb.h"
36#include "ortools/sat/sat_parameters.pb.h"
47 kGscip = SOLVER_TYPE_GSCIP,
58 kGlop = SOLVER_TYPE_GLOP,
65 kCpSat = SOLVER_TYPE_CP_SAT,
71 kPdlp = SOLVER_TYPE_PDLP,
90 kGlpk = SOLVER_TYPE_GLPK,
95 kEcos = SOLVER_TYPE_ECOS,
100 kScs = SOLVER_TYPE_SCS,
105 kHighs = SOLVER_TYPE_HIGHS,
183 kHigh = EMPHASIS_HIGH,
218 GurobiParametersProto
Proto()
const;
248 GlpkParametersProto
Proto()
const;
419 pdlp::PrimalDualHybridGradientParams
pdlp;
424 SolveParametersProto
Proto()
const;
425 static absl::StatusOr<SolveParameters>
FromProto(
426 const SolveParametersProto&
proto);
CpModelProto proto
The output proto.
#define MATH_OPT_DEFINE_ENUM(CppEnum, proto_unspecified_value)
When the underlying default is used When the feature cannot be turned kOff will return an error If the feature is enabled by the solver default is typically If the feature is kLow
bool AbslParseFlag(const absl::string_view text, SolverType *const value, std::string *const error)
SolverType
The solvers supported by MathOpt.
Emphasis
never give an error, and will map onto their best match.
LPAlgorithm
Selects an algorithm for solving linear programs.
When the underlying default is used When the feature cannot be turned kOff will return an error If the feature is enabled by the solver default is typically If the feature is kMedium
std::string AbslUnparseFlag(const SolverType value)
When the underlying default is used When the feature cannot be turned kOff will return an error If the feature is enabled by the solver default is typically If the feature is kHigh
In SWIG mode, we don't want anything besides these top-level includes.
std::optional< bool > compute_unbound_rays_if_possible
static GlpkParameters FromProto(const GlpkParametersProto &proto)
GlpkParametersProto Proto() const
gtl::linked_hash_map< std::string, std::string > param_values
Parameter name-value pairs to set in insertion order.
GurobiParametersProto Proto() const
static GurobiParameters FromProto(const GurobiParametersProto &proto)
std::optional< LPAlgorithm > lp_algorithm
std::optional< int64_t > node_limit
std::optional< int32_t > random_seed
absl::Duration time_limit
pdlp::PrimalDualHybridGradientParams pdlp
std::optional< double > relative_gap_tolerance
static absl::StatusOr< SolveParameters > FromProto(const SolveParametersProto &proto)
std::optional< Emphasis > heuristics
std::optional< Emphasis > scaling
std::optional< double > absolute_gap_tolerance
std::optional< Emphasis > cuts
sat::SatParameters cp_sat
std::optional< int32_t > solution_limit
std::optional< int32_t > threads
If unset, use the solver default. If set, it must be >= 1.
std::optional< int64_t > iteration_limit
std::optional< int32_t > solution_pool_size
SolveParametersProto Proto() const
std::optional< double > objective_limit
std::optional< Emphasis > presolve
std::optional< double > cutoff_limit
glop::GlopParameters glop
std::optional< double > best_bound_limit