![]() |
Google OR-Tools v9.12
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 1947 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1973 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1981 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2159 of file LinearSolver.pb.cs.
|
inline |
Clears the value of the "var_index" field.
Definition at line 2022 of file LinearSolver.pb.cs.
|
inline |
Clears the value of the "var_value" field.
Definition at line 2052 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1991 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2079 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2073 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2094 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2178 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2199 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2107 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2113 of file LinearSolver.pb.cs.
|
static |
Field number for the "constraint" field.
Definition at line 2057 of file LinearSolver.pb.cs.
|
static |
Field number for the "var_index" field.
Definition at line 1996 of file LinearSolver.pb.cs.
|
static |
Field number for the "var_value" field.
Definition at line 2027 of file LinearSolver.pb.cs.
|
getset |
The constraint activated by the indicator variable.
Definition at line 2064 of file LinearSolver.pb.cs.
|
staticget |
Definition at line 1961 of file LinearSolver.pb.cs.
|
get |
Gets whether the "var_index" field is set.
Definition at line 2016 of file LinearSolver.pb.cs.
|
get |
Gets whether the "var_value" field is set.
Definition at line 2046 of file LinearSolver.pb.cs.
|
staticget |
Definition at line 1957 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 2006 of file LinearSolver.pb.cs.
|
getset |
Value the above variable should take. Must be 0 or 1.
Definition at line 2036 of file LinearSolver.pb.cs.