24 switch (problem_status) {
28 return "PRIMAL_INFEASIBLE";
30 return "DUAL_INFEASIBLE";
32 return "INFEASIBLE_OR_UNBOUNDED";
34 return "PRIMAL_UNBOUNDED";
36 return "DUAL_UNBOUNDED";
40 return "PRIMAL_FEASIBLE";
42 return "DUAL_FEASIBLE";
46 return "INVALID_PROBLEM";
52 LOG(DFATAL) <<
"Invalid ProblemStatus " <<
static_cast<int>(problem_status);
53 return "UNKNOWN ProblemStatus";
57 switch (variable_type) {
59 return "UNCONSTRAINED";
61 return "LOWER_BOUNDED";
63 return "UPPER_BOUNDED";
65 return "UPPER_AND_LOWER_BOUNDED";
67 return "FIXED_VARIABLE";
71 LOG(DFATAL) <<
"Invalid VariableType " <<
static_cast<int>(variable_type);
72 return "UNKNOWN VariableType";
80 return "AT_LOWER_BOUND";
82 return "AT_UPPER_BOUND";
90 LOG(DFATAL) <<
"Invalid VariableStatus " <<
static_cast<int>(
status);
91 return "UNKNOWN VariableStatus";
99 return "AT_LOWER_BOUND";
101 return "AT_UPPER_BOUND";
103 return "FIXED_VALUE";
109 LOG(DFATAL) <<
"Invalid ConstraintStatus " <<
static_cast<int>(
status);
110 return "UNKNOWN ConstraintStatus";
128 LOG(DFATAL) <<
"Invalid VariableStatus " <<
static_cast<int>(
status);
std::string GetVariableTypeString(VariableType variable_type)
Returns the string representation of the VariableType enum.
std::string GetVariableStatusString(VariableStatus status)
Returns the string representation of the VariableStatus enum.
VariableType
Different types of variables.
@ UPPER_AND_LOWER_BOUNDED
std::string GetConstraintStatusString(ConstraintStatus status)
Returns the string representation of the ConstraintStatus enum.
ProblemStatus
Different statuses for a given problem.
@ INFEASIBLE_OR_UNBOUNDED
@ ABNORMAL
An error occurred during the solving process.
@ INVALID_PROBLEM
The input problem was invalid (see LinearProgram.IsValid()).
@ INIT
The solver didn't had a chance to prove anything.
ConstraintStatus VariableToConstraintStatus(VariableStatus status)
Returns the ConstraintStatus corresponding to a given VariableStatus.
std::string GetProblemStatusString(ProblemStatus problem_status)
Returns the string representation of the ProblemStatus enum.
In SWIG mode, we don't want anything besides these top-level includes.