![]() |
Google OR-Tools v9.15
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...
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 1946 of file LinearSolver.pb.cs.
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. | |
|
inline |
Definition at line 1972 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1980 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2158 of file LinearSolver.pb.cs.
|
inline |
Clears the value of the "var_index" field.
Definition at line 2021 of file LinearSolver.pb.cs.
|
inline |
Clears the value of the "var_value" field.
Definition at line 2051 of file LinearSolver.pb.cs.
|
inline |
Definition at line 1990 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2078 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2072 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2093 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2177 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2198 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2106 of file LinearSolver.pb.cs.
|
inline |
Definition at line 2112 of file LinearSolver.pb.cs.
|
static |
Field number for the "constraint" field.
Definition at line 2056 of file LinearSolver.pb.cs.
|
static |
Field number for the "var_index" field.
Definition at line 1995 of file LinearSolver.pb.cs.
|
static |
Field number for the "var_value" field.
Definition at line 2026 of file LinearSolver.pb.cs.
|
getset |
The constraint activated by the indicator variable.
Definition at line 2063 of file LinearSolver.pb.cs.
|
staticget |
Definition at line 1960 of file LinearSolver.pb.cs.
|
get |
Gets whether the "var_index" field is set.
Definition at line 2015 of file LinearSolver.pb.cs.
|
get |
Gets whether the "var_value" field is set.
Definition at line 2045 of file LinearSolver.pb.cs.
|
staticget |
Definition at line 1956 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 2005 of file LinearSolver.pb.cs.
|
getset |
Value the above variable should take. Must be 0 or 1.
Definition at line 2035 of file LinearSolver.pb.cs.