|
Minotaur 0.4.1
Docs for developers
|
#include <CxQuadHandler.h>
Public Types | |
| enum | Sense { LT , GT , EQ } |
| LT: x0x1 <= y; GT: x0x1 >= y; EQ: x0x1 = y. | |
Public Member Functions | |
| McCormick (VariablePtr x0, VariablePtr x1, Sense sense) | |
| Default constructor. | |
| ~McCormick () | |
| Destroy. | |
| void | setAux (VariablePtr y) |
| void | setC0 (ConstraintPtr c) |
Set the zeroth constraint: ![]() | |
| void | setC1 (ConstraintPtr c) |
Set the first constraint: ![]() | |
| void | setC2 (ConstraintPtr c) |
Set the third constrait: ![]() | |
| void | setC3 (ConstraintPtr c) |
Set the third constrait: ![]() | |
| ConstraintPtr | getC0 () |
| Get one of the four constraints. | |
| ConstraintPtr | getC1 () |
| ConstraintPtr | getC2 () |
| ConstraintPtr | getC3 () |
| VariablePtr | getAux () |
| Get the auxiliary variable. | |
| VariablePtr | getX0 () |
Get ![]() | |
| VariablePtr | getX1 () |
Get ![]() | |
| VariablePtr | getOtherX (ConstVariablePtr x) const |
| Get the variable other than x, in the product. | |
| Sense | getSense () |
| Get the sense of the bilinear constraint: LT, EQ, GT. | |
| void | setSense (Sense sense) |
| Set the sense of the bilinear constraint: LT, EQ, GT. | |
| bool | isViolated (const double *x, const double &tol) const |
| Check if a bilinear constraint is violated at the current point x. | |
| bool | isViolated (const double &x0val, const double &x1val, const double &y0val, const double &tol) const |
A McCormick object stores some information about McCormick inequalities for the constraints of the form 


| bool McCormick::isViolated | ( | const double & | x0val, |
| const double & | x1val, | ||
| const double & | y0val, | ||
| const double & | tol | ||
| ) | const |
Check if a bilinear constraint is violated for the given values of 
|
inline |
Set the auxiliary variable. If a bilinear term repeats itself, all such terms must share the same auxiliary variable.