operations_research Namespace Reference

Classes

class  MPConstraint
 The class for constraints of a Mathematical Programming (MP) model. More...
 
class  MPConstraintProto
 
class  MPGeneralConstraintProto
 
class  MPIndicatorConstraint
 
struct  MPModelExportOptions
 
class  MPModelProto
 
class  MPModelRequest
 
class  MPObjective
 A class to express a linear objective. More...
 
class  MPSolutionResponse
 
class  MPSolver
 This mathematical programming (MP) solver class is the main class though which users build and solve problems. More...
 
class  MPSolverCommonParameters
 
class  MPSolverInterface
 
class  MPSolverParameters
 This class stores parameter settings for LP and MIP solvers. More...
 
class  MPSosConstraint
 
class  MPVariable
 The class for variables of a Mathematical Programming (MP) model. More...
 
class  MPVariableProto
 
class  OptionalDouble
 
class  PartialVariableAssignment
 

Enumerations

enum  MPSosConstraint_Type : int { MPSosConstraint_Type_SOS1_DEFAULT = 0, MPSosConstraint_Type_SOS2 = 1 }
 
enum  MPSolverCommonParameters_LPAlgorithmValues : int { MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED = 0, MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_DUAL = 1, MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_PRIMAL = 2, MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER = 3 }
 
enum  MPModelRequest_SolverType : int {
  MPModelRequest_SolverType_GLOP_LINEAR_PROGRAMMING = 2, MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING = 0, MPModelRequest_SolverType_GLPK_LINEAR_PROGRAMMING = 1, MPModelRequest_SolverType_GUROBI_LINEAR_PROGRAMMING = 6,
  MPModelRequest_SolverType_CPLEX_LINEAR_PROGRAMMING = 10, MPModelRequest_SolverType_SCIP_MIXED_INTEGER_PROGRAMMING = 3, MPModelRequest_SolverType_GLPK_MIXED_INTEGER_PROGRAMMING = 4, MPModelRequest_SolverType_CBC_MIXED_INTEGER_PROGRAMMING = 5,
  MPModelRequest_SolverType_GUROBI_MIXED_INTEGER_PROGRAMMING = 7, MPModelRequest_SolverType_CPLEX_MIXED_INTEGER_PROGRAMMING = 11, MPModelRequest_SolverType_BOP_INTEGER_PROGRAMMING = 12, MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING = 14,
  MPModelRequest_SolverType_KNAPSACK_MIXED_INTEGER_PROGRAMMING = 13
}
 
enum  MPSolverResponseStatus : int {
  MPSOLVER_OPTIMAL = 0, MPSOLVER_FEASIBLE = 1, MPSOLVER_INFEASIBLE = 2, MPSOLVER_UNBOUNDED = 3,
  MPSOLVER_ABNORMAL = 4, MPSOLVER_NOT_SOLVED = 6, MPSOLVER_MODEL_IS_VALID = 97, MPSOLVER_UNKNOWN_STATUS = 99,
  MPSOLVER_MODEL_INVALID = 5, MPSOLVER_MODEL_INVALID_SOLUTION_HINT = 84, MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS = 85, MPSOLVER_SOLVER_TYPE_UNAVAILABLE = 7
}
 

Functions

const absl::string_view ToString (MPSolver::OptimizationProblemType optimization_problem_type)
 
std::ostream & operator<< (std::ostream &os, MPSolver::OptimizationProblemType optimization_problem_type)
 
std::ostream & operator<< (std::ostream &os, MPSolver::ResultStatus status)
 
bool AbslParseFlag (absl::string_view text, MPSolver::OptimizationProblemType *solver_type, std::string *error)
 
std::string AbslUnparseFlag (MPSolver::OptimizationProblemType solver_type)
 
util::StatusOr< std::string > ExportModelAsLpFormat (const MPModelProto &model, const MPModelExportOptions &options=MPModelExportOptions())
 
util::StatusOr< std::string > ExportModelAsMpsFormat (const MPModelProto &model, const MPModelExportOptions &options=MPModelExportOptions())
 
std::string ExportModelAsLpFormatReturnString (const MPModelProto &input_model, const MPModelExportOptions &options=MPModelExportOptions())
 
std::string ExportModelAsMpsFormatReturnString (const MPModelProto &input_model, const MPModelExportOptions &options=MPModelExportOptions())
 
std::string FindErrorInMPModelProto (const MPModelProto &model)
 
std::string FindFeasibilityErrorInSolutionHint (const MPModelProto &model, double tolerance)
 
bool MPSosConstraint_Type_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * MPSosConstraint_Type_descriptor ()
 
template<typename T >
const std::string & MPSosConstraint_Type_Name (T enum_t_value)
 
bool MPSosConstraint_Type_Parse (const std::string &name, MPSosConstraint_Type *value)
 
bool MPSolverCommonParameters_LPAlgorithmValues_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * MPSolverCommonParameters_LPAlgorithmValues_descriptor ()
 
template<typename T >
const std::string & MPSolverCommonParameters_LPAlgorithmValues_Name (T enum_t_value)
 
bool MPSolverCommonParameters_LPAlgorithmValues_Parse (const std::string &name, MPSolverCommonParameters_LPAlgorithmValues *value)
 
bool MPModelRequest_SolverType_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * MPModelRequest_SolverType_descriptor ()
 
template<typename T >
const std::string & MPModelRequest_SolverType_Name (T enum_t_value)
 
bool MPModelRequest_SolverType_Parse (const std::string &name, MPModelRequest_SolverType *value)
 
bool MPSolverResponseStatus_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * MPSolverResponseStatus_descriptor ()
 
template<typename T >
const std::string & MPSolverResponseStatus_Name (T enum_t_value)
 
bool MPSolverResponseStatus_Parse (const std::string &name, MPSolverResponseStatus *value)
 

Variables

constexpr double kDefaultPrimalTolerance = 1e-07
 
MPConstraintProtoDefaultTypeInternal _MPConstraintProto_default_instance_
 
MPGeneralConstraintProtoDefaultTypeInternal _MPGeneralConstraintProto_default_instance_
 
MPIndicatorConstraintDefaultTypeInternal _MPIndicatorConstraint_default_instance_
 
MPModelProtoDefaultTypeInternal _MPModelProto_default_instance_
 
MPModelRequestDefaultTypeInternal _MPModelRequest_default_instance_
 
MPSolutionResponseDefaultTypeInternal _MPSolutionResponse_default_instance_
 
MPSolverCommonParametersDefaultTypeInternal _MPSolverCommonParameters_default_instance_
 
MPSosConstraintDefaultTypeInternal _MPSosConstraint_default_instance_
 
MPVariableProtoDefaultTypeInternal _MPVariableProto_default_instance_
 
OptionalDoubleDefaultTypeInternal _OptionalDouble_default_instance_
 
PartialVariableAssignmentDefaultTypeInternal _PartialVariableAssignment_default_instance_
 
constexpr MPSosConstraint_Type MPSosConstraint_Type_Type_MIN = MPSosConstraint_Type_SOS1_DEFAULT
 
constexpr MPSosConstraint_Type MPSosConstraint_Type_Type_MAX = MPSosConstraint_Type_SOS2
 
constexpr int MPSosConstraint_Type_Type_ARRAYSIZE = MPSosConstraint_Type_Type_MAX + 1
 
constexpr MPSolverCommonParameters_LPAlgorithmValues MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN = MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED
 
constexpr MPSolverCommonParameters_LPAlgorithmValues MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX = MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER
 
constexpr int MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE = MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX + 1
 
constexpr MPModelRequest_SolverType MPModelRequest_SolverType_SolverType_MIN = MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING
 
constexpr MPModelRequest_SolverType MPModelRequest_SolverType_SolverType_MAX = MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING
 
constexpr int MPModelRequest_SolverType_SolverType_ARRAYSIZE = MPModelRequest_SolverType_SolverType_MAX + 1
 
constexpr MPSolverResponseStatus MPSolverResponseStatus_MIN = MPSOLVER_OPTIMAL
 
constexpr MPSolverResponseStatus MPSolverResponseStatus_MAX = MPSOLVER_UNKNOWN_STATUS
 
constexpr int MPSolverResponseStatus_ARRAYSIZE = MPSolverResponseStatus_MAX + 1
 

Enumeration Type Documentation

◆ MPModelRequest_SolverType

Enumerator
MPModelRequest_SolverType_GLOP_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_GLPK_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_GUROBI_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_CPLEX_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_SCIP_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_GLPK_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_CBC_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_GUROBI_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_CPLEX_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_BOP_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_KNAPSACK_MIXED_INTEGER_PROGRAMMING 

Definition at line 157 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues

Enumerator
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED 
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_DUAL 
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_PRIMAL 
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER 

Definition at line 132 of file linear_solver.pb.h.

◆ MPSolverResponseStatus

Enumerator
MPSOLVER_OPTIMAL 
MPSOLVER_FEASIBLE 
MPSOLVER_INFEASIBLE 
MPSOLVER_UNBOUNDED 
MPSOLVER_ABNORMAL 
MPSOLVER_NOT_SOLVED 
MPSOLVER_MODEL_IS_VALID 
MPSOLVER_UNKNOWN_STATUS 
MPSOLVER_MODEL_INVALID 
MPSOLVER_MODEL_INVALID_SOLUTION_HINT 
MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS 
MPSOLVER_SOLVER_TYPE_UNAVAILABLE 

Definition at line 191 of file linear_solver.pb.h.

◆ MPSosConstraint_Type

Enumerator
MPSosConstraint_Type_SOS1_DEFAULT 
MPSosConstraint_Type_SOS2 

Definition at line 109 of file linear_solver.pb.h.

Function Documentation

◆ AbslParseFlag()

bool operations_research::AbslParseFlag ( absl::string_view  text,
MPSolver::OptimizationProblemType solver_type,
std::string *  error 
)

◆ AbslUnparseFlag()

std::string operations_research::AbslUnparseFlag ( MPSolver::OptimizationProblemType  solver_type)
inline

Definition at line 911 of file linear_solver.h.

◆ ExportModelAsLpFormat()

util::StatusOr<std::string> operations_research::ExportModelAsLpFormat ( const MPModelProto model,
const MPModelExportOptions options = MPModelExportOptions() 
)

◆ ExportModelAsLpFormatReturnString()

std::string operations_research::ExportModelAsLpFormatReturnString ( const MPModelProto input_model,
const MPModelExportOptions options = MPModelExportOptions() 
)

Definition at line 24 of file model_exporter_swig_helper.h.

◆ ExportModelAsMpsFormat()

util::StatusOr<std::string> operations_research::ExportModelAsMpsFormat ( const MPModelProto model,
const MPModelExportOptions options = MPModelExportOptions() 
)

◆ ExportModelAsMpsFormatReturnString()

std::string operations_research::ExportModelAsMpsFormatReturnString ( const MPModelProto input_model,
const MPModelExportOptions options = MPModelExportOptions() 
)

Definition at line 31 of file model_exporter_swig_helper.h.

◆ FindErrorInMPModelProto()

std::string operations_research::FindErrorInMPModelProto ( const MPModelProto model)

◆ FindFeasibilityErrorInSolutionHint()

std::string operations_research::FindFeasibilityErrorInSolutionHint ( const MPModelProto model,
double  tolerance 
)

◆ MPModelRequest_SolverType_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::MPModelRequest_SolverType_descriptor ( )

◆ MPModelRequest_SolverType_IsValid()

bool operations_research::MPModelRequest_SolverType_IsValid ( int  value)

◆ MPModelRequest_SolverType_Name()

template<typename T >
const std::string& operations_research::MPModelRequest_SolverType_Name ( enum_t_value)
inline

Definition at line 179 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_Parse()

bool operations_research::MPModelRequest_SolverType_Parse ( const std::string &  name,
MPModelRequest_SolverType value 
)
inline

Definition at line 186 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::MPSolverCommonParameters_LPAlgorithmValues_descriptor ( )

◆ MPSolverCommonParameters_LPAlgorithmValues_IsValid()

bool operations_research::MPSolverCommonParameters_LPAlgorithmValues_IsValid ( int  value)

◆ MPSolverCommonParameters_LPAlgorithmValues_Name()

template<typename T >
const std::string& operations_research::MPSolverCommonParameters_LPAlgorithmValues_Name ( enum_t_value)
inline

Definition at line 145 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_Parse()

bool operations_research::MPSolverCommonParameters_LPAlgorithmValues_Parse ( const std::string &  name,
MPSolverCommonParameters_LPAlgorithmValues value 
)
inline

Definition at line 152 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::MPSolverResponseStatus_descriptor ( )

◆ MPSolverResponseStatus_IsValid()

bool operations_research::MPSolverResponseStatus_IsValid ( int  value)

◆ MPSolverResponseStatus_Name()

template<typename T >
const std::string& operations_research::MPSolverResponseStatus_Name ( enum_t_value)
inline

Definition at line 212 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_Parse()

bool operations_research::MPSolverResponseStatus_Parse ( const std::string &  name,
MPSolverResponseStatus value 
)
inline

Definition at line 219 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::MPSosConstraint_Type_descriptor ( )

◆ MPSosConstraint_Type_IsValid()

bool operations_research::MPSosConstraint_Type_IsValid ( int  value)

◆ MPSosConstraint_Type_Name()

template<typename T >
const std::string& operations_research::MPSosConstraint_Type_Name ( enum_t_value)
inline

Definition at line 120 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Parse()

bool operations_research::MPSosConstraint_Type_Parse ( const std::string &  name,
MPSosConstraint_Type value 
)
inline

Definition at line 127 of file linear_solver.pb.h.

◆ operator<<() [1/2]

std::ostream& operations_research::operator<< ( std::ostream &  os,
MPSolver::OptimizationProblemType  optimization_problem_type 
)
inline

Definition at line 895 of file linear_solver.h.

◆ operator<<() [2/2]

std::ostream& operations_research::operator<< ( std::ostream &  os,
MPSolver::ResultStatus  status 
)
inline

Definition at line 901 of file linear_solver.h.

◆ ToString()

const absl::string_view operations_research::ToString ( MPSolver::OptimizationProblemType  optimization_problem_type)

Variable Documentation

◆ _MPConstraintProto_default_instance_

MPConstraintProtoDefaultTypeInternal operations_research::_MPConstraintProto_default_instance_

◆ _MPGeneralConstraintProto_default_instance_

MPGeneralConstraintProtoDefaultTypeInternal operations_research::_MPGeneralConstraintProto_default_instance_

◆ _MPIndicatorConstraint_default_instance_

MPIndicatorConstraintDefaultTypeInternal operations_research::_MPIndicatorConstraint_default_instance_

◆ _MPModelProto_default_instance_

MPModelProtoDefaultTypeInternal operations_research::_MPModelProto_default_instance_

◆ _MPModelRequest_default_instance_

MPModelRequestDefaultTypeInternal operations_research::_MPModelRequest_default_instance_

◆ _MPSolutionResponse_default_instance_

MPSolutionResponseDefaultTypeInternal operations_research::_MPSolutionResponse_default_instance_

◆ _MPSolverCommonParameters_default_instance_

MPSolverCommonParametersDefaultTypeInternal operations_research::_MPSolverCommonParameters_default_instance_

◆ _MPSosConstraint_default_instance_

MPSosConstraintDefaultTypeInternal operations_research::_MPSosConstraint_default_instance_

◆ _MPVariableProto_default_instance_

MPVariableProtoDefaultTypeInternal operations_research::_MPVariableProto_default_instance_

◆ _OptionalDouble_default_instance_

OptionalDoubleDefaultTypeInternal operations_research::_OptionalDouble_default_instance_

◆ _PartialVariableAssignment_default_instance_

PartialVariableAssignmentDefaultTypeInternal operations_research::_PartialVariableAssignment_default_instance_

◆ kDefaultPrimalTolerance

constexpr double operations_research::kDefaultPrimalTolerance = 1e-07

Definition at line 162 of file linear_solver.h.

◆ MPModelRequest_SolverType_SolverType_ARRAYSIZE

constexpr int operations_research::MPModelRequest_SolverType_SolverType_ARRAYSIZE = MPModelRequest_SolverType_SolverType_MAX + 1

Definition at line 175 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_SolverType_MAX

constexpr MPModelRequest_SolverType operations_research::MPModelRequest_SolverType_SolverType_MAX = MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING

Definition at line 174 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_SolverType_MIN

constexpr MPModelRequest_SolverType operations_research::MPModelRequest_SolverType_SolverType_MIN = MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING

Definition at line 173 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE

constexpr int operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE = MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX + 1

Definition at line 141 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX

constexpr MPSolverCommonParameters_LPAlgorithmValues operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX = MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER

Definition at line 140 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN

constexpr MPSolverCommonParameters_LPAlgorithmValues operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN = MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED

Definition at line 139 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_ARRAYSIZE

constexpr int operations_research::MPSolverResponseStatus_ARRAYSIZE = MPSolverResponseStatus_MAX + 1

Definition at line 208 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_MAX

constexpr MPSolverResponseStatus operations_research::MPSolverResponseStatus_MAX = MPSOLVER_UNKNOWN_STATUS

Definition at line 207 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_MIN

constexpr MPSolverResponseStatus operations_research::MPSolverResponseStatus_MIN = MPSOLVER_OPTIMAL

Definition at line 206 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Type_ARRAYSIZE

constexpr int operations_research::MPSosConstraint_Type_Type_ARRAYSIZE = MPSosConstraint_Type_Type_MAX + 1

Definition at line 116 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Type_MAX

constexpr MPSosConstraint_Type operations_research::MPSosConstraint_Type_Type_MAX = MPSosConstraint_Type_SOS2

Definition at line 115 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Type_MIN

constexpr MPSosConstraint_Type operations_research::MPSosConstraint_Type_Type_MIN = MPSosConstraint_Type_SOS1_DEFAULT

Definition at line 114 of file linear_solver.pb.h.