Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class MPConstraint
Note: This documentation is automatically generated.
Method |
basis_status | Return type: MPSolver::BasisStatus |
Clear | Return type: void Clears all variables and coefficients. Does not clear the bounds.
|
dual_value | Return type: double |
GetCoefficient | Return type: double Arguments: const MPVariable* const var |
index | Return type: int Returns the index of the constraint in the MPSolver::constraints_.
|
indicator_value | Return type: bool |
indicator_variable | Return type: const MPVariable* |
is_lazy | Return type: bool Advanced usage: returns true if the constraint is "lazy" (see below).
|
lb | Return type: double Returns the lower bound.
|
name | Return type: const std::string& Returns the name of the constraint.
|
set_is_lazy | Return type: void Arguments: bool laziness |
SetBounds | Return type: void Arguments: double lb, double ub Sets both the lower and upper bounds.
|
SetCoefficient | Return type: void Arguments: const MPVariable* const var, double coeff |
SetLB | Return type: void Arguments: double lb Sets the lower bound.
|
SetUB | Return type: void Arguments: double ub Sets the upper bound.
|
terms | Return type: const absl::flat_hash_map<const MPVariable*, double>& |
ub | Return type: double Returns the upper bound.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-09-14 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]