Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Indicator constraints encode the activation or deactivation of linear constraints given the value of one Boolean variable in the model. For example: y = 0 => 2 * x1 + 3 * x2 >= 42 The 2 * x1 + 3 * x2 >= 42 constraint is only active if the variable y is equal to 0. As of 2019/04, only SCIP, CP-SAT and Gurobi support this constraint type. More...
Public Member Functions | |
MPIndicatorConstraint () | |
MPIndicatorConstraint (MPIndicatorConstraint other) | |
MPIndicatorConstraint | Clone () |
void | ClearVarIndex () |
Clears the value of the "var_index" field. | |
void | ClearVarValue () |
Clears the value of the "var_value" field. | |
override bool | Equals (object other) |
bool | Equals (MPIndicatorConstraint other) |
override int | GetHashCode () |
override string | ToString () |
void | WriteTo (pb::CodedOutputStream output) |
int | CalculateSize () |
void | MergeFrom (MPIndicatorConstraint other) |
void | MergeFrom (pb::CodedInputStream input) |
Static Public Attributes | |
const int | VarIndexFieldNumber = 1 |
Field number for the "var_index" field. | |
const int | VarValueFieldNumber = 2 |
Field number for the "var_value" field. | |
const int | ConstraintFieldNumber = 3 |
Field number for the "constraint" field. | |
Properties | |
static pb::MessageParser< MPIndicatorConstraint > | Parser [get] |
static pbr::MessageDescriptor | Descriptor [get] |
int | VarIndex [get, set] |
Variable index (w.r.t. the "variable" field of MPModelProto) of the Boolean variable used as indicator. | |
bool | HasVarIndex [get] |
Gets whether the "var_index" field is set. | |
int | VarValue [get, set] |
Value the above variable should take. Must be 0 or 1. | |
bool | HasVarValue [get] |
Gets whether the "var_value" field is set. | |
global::OperationsResearch.MPConstraintProto | Constraint [get, set] |
The constraint activated by the indicator variable. | |
Indicator constraints encode the activation or deactivation of linear constraints given the value of one Boolean variable in the model. For example: y = 0 => 2 * x1 + 3 * x2 >= 42 The 2 * x1 + 3 * x2 >= 42 constraint is only active if the variable y is equal to 0. As of 2019/04, only SCIP, CP-SAT and Gurobi support this constraint type.
Definition at line 1923 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1949 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1957 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2135 of file LinearSolver.pb.cs.
|
inline |
Clears the value of the "var_index" field.
Definition at line 1998 of file LinearSolver.pb.cs.
|
inline |
Clears the value of the "var_value" field.
Definition at line 2028 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1967 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2055 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2049 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2070 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2154 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2175 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2083 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2089 of file LinearSolver.pb.cs.
|
static |
Field number for the "constraint" field.
Definition at line 2033 of file LinearSolver.pb.cs.
|
static |
Field number for the "var_index" field.
Definition at line 1972 of file LinearSolver.pb.cs.
|
static |
Field number for the "var_value" field.
Definition at line 2003 of file LinearSolver.pb.cs.
|
getset |
The constraint activated by the indicator variable.
Definition at line 2040 of file LinearSolver.pb.cs.
|
staticget |
Definition at line 1937 of file LinearSolver.pb.cs.
|
get |
Gets whether the "var_index" field is set.
Definition at line 1992 of file LinearSolver.pb.cs.
|
get |
Gets whether the "var_value" field is set.
Definition at line 2022 of file LinearSolver.pb.cs.
|
staticget |
Definition at line 1933 of file LinearSolver.pb.cs.
|
getset |
Variable index (w.r.t. the "variable" field of MPModelProto) of the Boolean variable used as indicator.
Definition at line 1982 of file LinearSolver.pb.cs.
|
getset |
Value the above variable should take. Must be 0 or 1.
Definition at line 2012 of file LinearSolver.pb.cs.