Define BiLinear objects. More...
#include <CbcLinked.hpp>
Public Member Functions | |
OsiBiLinear () | |
OsiBiLinear (OsiSolverInterface *solver, int xColumn, int yColumn, int xyRow, double coefficient, double xMesh, double yMesh, int numberExistingObjects=0, const OsiObject **objects=NULL) | |
Useful constructor - This Adds in rows and variables to construct valid Linked Ordered Set Adds extra constraints to match other x/y So note not const solver. | |
OsiBiLinear (CoinModel *coinModel, int xColumn, int yColumn, int xyRow, double coefficient, double xMesh, double yMesh, int numberExistingObjects=0, const OsiObject **objects=NULL) | |
Useful constructor - This Adds in rows and variables to construct valid Linked Ordered Set Adds extra constraints to match other x/y So note not const model. | |
OsiBiLinear (const OsiBiLinear &) | |
virtual OsiObject * | clone () const |
Clone. | |
OsiBiLinear & | operator= (const OsiBiLinear &rhs) |
virtual | ~OsiBiLinear () |
virtual double | infeasibility (const OsiBranchingInformation *info, int &whichWay) const |
Infeasibility - large is 0.5. | |
virtual double | feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const |
Set bounds to fix the variable at the current (integer) value. | |
virtual OsiBranchingObject * | createBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const |
Creates a branching object. | |
virtual void | resetSequenceEtc (int numberColumns, const int *originalColumns) |
Redoes data when sequence numbers change. | |
virtual double | checkInfeasibility (const OsiBranchingInformation *info) const |
virtual bool | canDoHeuristics () const |
Return true if object can take part in normal heuristics. | |
virtual bool | boundBranch () const |
Return true if branch should only bound variables. | |
int | xColumn () const |
X column. | |
int | yColumn () const |
Y column. | |
int | xRow () const |
X row. | |
int | yRow () const |
Y row. | |
int | xyRow () const |
XY row. | |
double | coefficient () const |
Coefficient. | |
void | setCoefficient (double value) |
Set coefficient. | |
int | firstLambda () const |
First lambda (of 4). | |
double | xSatisfied () const |
X satisfied if less than this away from mesh. | |
void | setXSatisfied (double value) |
double | ySatisfied () const |
Y satisfied if less than this away from mesh. | |
void | setYSatisfied (double value) |
double | xOtherSatisfied () const |
X other satisfied if less than this away from mesh. | |
void | setXOtherSatisfied (double value) |
double | yOtherSatisfied () const |
Y other satisfied if less than this away from mesh. | |
void | setYOtherSatisfied (double value) |
double | xMeshSize () const |
X meshSize. | |
void | setXMeshSize (double value) |
double | yMeshSize () const |
Y meshSize. | |
void | setYMeshSize (double value) |
double | xySatisfied () const |
XY satisfied if two version differ by less than this. | |
void | setXYSatisfied (double value) |
void | setMeshSizes (const OsiSolverInterface *solver, double x, double y) |
Set sizes and other stuff. | |
int | branchingStrategy () const |
branching strategy etc bottom 2 bits 0 branch on either, 1 branch on x, 2 branch on y next bit 4 set to say don't update coefficients next bit 8 set to say don't use in feasible region next bit 16 set to say - Always satisfied !! | |
void | setBranchingStrategy (int value) |
int | boundType () const |
Simple quadratic bound marker. | |
void | setBoundType (int value) |
void | newBounds (OsiSolverInterface *solver, int way, short xOrY, double separator) const |
Does work of branching. | |
int | updateCoefficients (const double *lower, const double *upper, double *objective, CoinPackedMatrix *matrix, CoinWarmStartBasis *basis) const |
Updates coefficients - returns number updated. | |
double | xyCoefficient (const double *solution) const |
Returns true value of single xyRow coefficient. | |
void | getCoefficients (const OsiSolverInterface *solver, double xB[2], double yB[2], double xybar[4]) const |
Get LU coefficients from matrix. | |
double | computeLambdas (const double xB[3], const double yB[3], const double xybar[4], double lambda[4]) const |
Compute lambdas (third entry in each .B is current value) (nonzero if bad). | |
void | addExtraRow (int row, double multiplier) |
Adds in data for extra row with variable coefficients. | |
void | getPseudoShadow (const OsiBranchingInformation *info) |
Sets infeasibility and other when pseudo shadow prices. | |
double | getMovement (const OsiBranchingInformation *info) |
Gets sum of movements to correct value. | |
Protected Member Functions | |
void | computeLambdas (const OsiSolverInterface *solver, double lambda[4]) const |
Compute lambdas if coefficients not changing. | |
Protected Attributes | |
double | coefficient_ |
data | |
double | xMeshSize_ |
x mesh | |
double | yMeshSize_ |
y mesh | |
double | xSatisfied_ |
x satisfied if less than this away from mesh | |
double | ySatisfied_ |
y satisfied if less than this away from mesh | |
double | xOtherSatisfied_ |
X other satisfied if less than this away from mesh. | |
double | yOtherSatisfied_ |
Y other satisfied if less than this away from mesh. | |
double | xySatisfied_ |
xy satisfied if less than this away from true | |
double | xyBranchValue_ |
value of x or y to branch about | |
int | xColumn_ |
x column | |
int | yColumn_ |
y column | |
int | firstLambda_ |
First lambda (of 4). | |
int | branchingStrategy_ |
branching strategy etc bottom 2 bits 0 branch on either, 1 branch on x, 2 branch on y next bit 4 set to say don't update coefficients next bit 8 set to say don't use in feasible region next bit 16 set to say - Always satisfied !! | |
int | boundType_ |
Simple quadratic bound marker. | |
int | xRow_ |
x row | |
int | yRow_ |
y row (-1 if x*x) | |
int | xyRow_ |
Output row. | |
int | convexity_ |
Convexity row. | |
int | numberExtraRows_ |
Number of extra rows (coefficients to be modified). | |
double * | multiplier_ |
Multiplier for coefficient on row. | |
int * | extraRow_ |
Row number. | |
short | chosen_ |
Which chosen -1 none, 0 x, 1 y. |
Define BiLinear objects.
This models x*y where one or both are integer
Definition at line 692 of file CbcLinked.hpp.
OsiBiLinear::OsiBiLinear | ( | ) |
OsiBiLinear::OsiBiLinear | ( | OsiSolverInterface * | solver, | |
int | xColumn, | |||
int | yColumn, | |||
int | xyRow, | |||
double | coefficient, | |||
double | xMesh, | |||
double | yMesh, | |||
int | numberExistingObjects = 0 , |
|||
const OsiObject ** | objects = NULL | |||
) |
Useful constructor - This Adds in rows and variables to construct valid Linked Ordered Set Adds extra constraints to match other x/y So note not const solver.
OsiBiLinear::OsiBiLinear | ( | CoinModel * | coinModel, | |
int | xColumn, | |||
int | yColumn, | |||
int | xyRow, | |||
double | coefficient, | |||
double | xMesh, | |||
double | yMesh, | |||
int | numberExistingObjects = 0 , |
|||
const OsiObject ** | objects = NULL | |||
) |
Useful constructor - This Adds in rows and variables to construct valid Linked Ordered Set Adds extra constraints to match other x/y So note not const model.
OsiBiLinear::OsiBiLinear | ( | const OsiBiLinear & | ) |
virtual OsiBiLinear::~OsiBiLinear | ( | ) | [virtual] |
virtual OsiObject* OsiBiLinear::clone | ( | ) | const [virtual] |
Clone.
Reimplemented in OsiBiLinearEquality.
OsiBiLinear& OsiBiLinear::operator= | ( | const OsiBiLinear & | rhs | ) |
virtual double OsiBiLinear::infeasibility | ( | const OsiBranchingInformation * | info, | |
int & | whichWay | |||
) | const [virtual] |
Infeasibility - large is 0.5.
virtual double OsiBiLinear::feasibleRegion | ( | OsiSolverInterface * | solver, | |
const OsiBranchingInformation * | info | |||
) | const [virtual] |
Set bounds to fix the variable at the current (integer) value.
Given an integer value, set the lower and upper bounds to fix the variable. Returns amount it had to move variable.
virtual OsiBranchingObject* OsiBiLinear::createBranch | ( | OsiSolverInterface * | solver, | |
const OsiBranchingInformation * | info, | |||
int | way | |||
) | const [virtual] |
Creates a branching object.
The preferred direction is set by way
, 0 for down, 1 for up.
virtual void OsiBiLinear::resetSequenceEtc | ( | int | numberColumns, | |
const int * | originalColumns | |||
) | [virtual] |
Redoes data when sequence numbers change.
virtual double OsiBiLinear::checkInfeasibility | ( | const OsiBranchingInformation * | info | ) | const [virtual] |
virtual bool OsiBiLinear::canDoHeuristics | ( | ) | const [inline, virtual] |
Return true if object can take part in normal heuristics.
Definition at line 757 of file CbcLinked.hpp.
virtual bool OsiBiLinear::boundBranch | ( | ) | const [inline, virtual] |
Return true if branch should only bound variables.
Definition at line 761 of file CbcLinked.hpp.
int OsiBiLinear::xColumn | ( | ) | const [inline] |
X column.
Definition at line 764 of file CbcLinked.hpp.
int OsiBiLinear::yColumn | ( | ) | const [inline] |
Y column.
Definition at line 767 of file CbcLinked.hpp.
int OsiBiLinear::xRow | ( | ) | const [inline] |
X row.
Definition at line 770 of file CbcLinked.hpp.
int OsiBiLinear::yRow | ( | ) | const [inline] |
Y row.
Definition at line 773 of file CbcLinked.hpp.
int OsiBiLinear::xyRow | ( | ) | const [inline] |
XY row.
Definition at line 776 of file CbcLinked.hpp.
double OsiBiLinear::coefficient | ( | ) | const [inline] |
Coefficient.
Definition at line 779 of file CbcLinked.hpp.
void OsiBiLinear::setCoefficient | ( | double | value | ) | [inline] |
Set coefficient.
Definition at line 782 of file CbcLinked.hpp.
int OsiBiLinear::firstLambda | ( | ) | const [inline] |
First lambda (of 4).
Definition at line 785 of file CbcLinked.hpp.
double OsiBiLinear::xSatisfied | ( | ) | const [inline] |
X satisfied if less than this away from mesh.
Definition at line 788 of file CbcLinked.hpp.
void OsiBiLinear::setXSatisfied | ( | double | value | ) | [inline] |
Definition at line 790 of file CbcLinked.hpp.
double OsiBiLinear::ySatisfied | ( | ) | const [inline] |
Y satisfied if less than this away from mesh.
Definition at line 793 of file CbcLinked.hpp.
void OsiBiLinear::setYSatisfied | ( | double | value | ) | [inline] |
Definition at line 795 of file CbcLinked.hpp.
double OsiBiLinear::xOtherSatisfied | ( | ) | const [inline] |
X other satisfied if less than this away from mesh.
Definition at line 798 of file CbcLinked.hpp.
void OsiBiLinear::setXOtherSatisfied | ( | double | value | ) | [inline] |
Definition at line 800 of file CbcLinked.hpp.
double OsiBiLinear::yOtherSatisfied | ( | ) | const [inline] |
Y other satisfied if less than this away from mesh.
Definition at line 803 of file CbcLinked.hpp.
void OsiBiLinear::setYOtherSatisfied | ( | double | value | ) | [inline] |
Definition at line 805 of file CbcLinked.hpp.
double OsiBiLinear::xMeshSize | ( | ) | const [inline] |
X meshSize.
Definition at line 808 of file CbcLinked.hpp.
void OsiBiLinear::setXMeshSize | ( | double | value | ) | [inline] |
Definition at line 810 of file CbcLinked.hpp.
double OsiBiLinear::yMeshSize | ( | ) | const [inline] |
Y meshSize.
Definition at line 813 of file CbcLinked.hpp.
void OsiBiLinear::setYMeshSize | ( | double | value | ) | [inline] |
Definition at line 815 of file CbcLinked.hpp.
double OsiBiLinear::xySatisfied | ( | ) | const [inline] |
XY satisfied if two version differ by less than this.
Definition at line 818 of file CbcLinked.hpp.
void OsiBiLinear::setXYSatisfied | ( | double | value | ) | [inline] |
Definition at line 820 of file CbcLinked.hpp.
void OsiBiLinear::setMeshSizes | ( | const OsiSolverInterface * | solver, | |
double | x, | |||
double | y | |||
) |
Set sizes and other stuff.
int OsiBiLinear::branchingStrategy | ( | ) | const [inline] |
branching strategy etc bottom 2 bits 0 branch on either, 1 branch on x, 2 branch on y next bit 4 set to say don't update coefficients next bit 8 set to say don't use in feasible region next bit 16 set to say - Always satisfied !!
Definition at line 834 of file CbcLinked.hpp.
void OsiBiLinear::setBranchingStrategy | ( | int | value | ) | [inline] |
Definition at line 836 of file CbcLinked.hpp.
int OsiBiLinear::boundType | ( | ) | const [inline] |
Simple quadratic bound marker.
0 no 1 L if coefficient pos, G if negative i.e. value is ub on xy 2 G if coefficient pos, L if negative i.e. value is lb on xy 3 E If bound then real coefficient is 1.0 and coefficient_ is bound
Definition at line 845 of file CbcLinked.hpp.
void OsiBiLinear::setBoundType | ( | int | value | ) | [inline] |
Definition at line 847 of file CbcLinked.hpp.
void OsiBiLinear::newBounds | ( | OsiSolverInterface * | solver, | |
int | way, | |||
short | xOrY, | |||
double | separator | |||
) | const |
Does work of branching.
int OsiBiLinear::updateCoefficients | ( | const double * | lower, | |
const double * | upper, | |||
double * | objective, | |||
CoinPackedMatrix * | matrix, | |||
CoinWarmStartBasis * | basis | |||
) | const |
Updates coefficients - returns number updated.
double OsiBiLinear::xyCoefficient | ( | const double * | solution | ) | const |
Returns true value of single xyRow coefficient.
void OsiBiLinear::getCoefficients | ( | const OsiSolverInterface * | solver, | |
double | xB[2], | |||
double | yB[2], | |||
double | xybar[4] | |||
) | const |
Get LU coefficients from matrix.
double OsiBiLinear::computeLambdas | ( | const double | xB[3], | |
const double | yB[3], | |||
const double | xybar[4], | |||
double | lambda[4] | |||
) | const |
Compute lambdas (third entry in each .B is current value) (nonzero if bad).
void OsiBiLinear::addExtraRow | ( | int | row, | |
double | multiplier | |||
) |
Adds in data for extra row with variable coefficients.
void OsiBiLinear::getPseudoShadow | ( | const OsiBranchingInformation * | info | ) |
Sets infeasibility and other when pseudo shadow prices.
double OsiBiLinear::getMovement | ( | const OsiBranchingInformation * | info | ) |
Gets sum of movements to correct value.
void OsiBiLinear::computeLambdas | ( | const OsiSolverInterface * | solver, | |
double | lambda[4] | |||
) | const [protected] |
Compute lambdas if coefficients not changing.
double OsiBiLinear::coefficient_ [protected] |
double OsiBiLinear::xMeshSize_ [protected] |
x mesh
Definition at line 875 of file CbcLinked.hpp.
double OsiBiLinear::yMeshSize_ [protected] |
y mesh
Definition at line 877 of file CbcLinked.hpp.
double OsiBiLinear::xSatisfied_ [protected] |
x satisfied if less than this away from mesh
Definition at line 879 of file CbcLinked.hpp.
double OsiBiLinear::ySatisfied_ [protected] |
y satisfied if less than this away from mesh
Definition at line 881 of file CbcLinked.hpp.
double OsiBiLinear::xOtherSatisfied_ [protected] |
X other satisfied if less than this away from mesh.
Definition at line 883 of file CbcLinked.hpp.
double OsiBiLinear::yOtherSatisfied_ [protected] |
Y other satisfied if less than this away from mesh.
Definition at line 885 of file CbcLinked.hpp.
double OsiBiLinear::xySatisfied_ [protected] |
xy satisfied if less than this away from true
Definition at line 887 of file CbcLinked.hpp.
double OsiBiLinear::xyBranchValue_ [mutable, protected] |
value of x or y to branch about
Definition at line 889 of file CbcLinked.hpp.
int OsiBiLinear::xColumn_ [protected] |
x column
Definition at line 891 of file CbcLinked.hpp.
int OsiBiLinear::yColumn_ [protected] |
y column
Definition at line 893 of file CbcLinked.hpp.
int OsiBiLinear::firstLambda_ [protected] |
First lambda (of 4).
Definition at line 895 of file CbcLinked.hpp.
int OsiBiLinear::branchingStrategy_ [protected] |
branching strategy etc bottom 2 bits 0 branch on either, 1 branch on x, 2 branch on y next bit 4 set to say don't update coefficients next bit 8 set to say don't use in feasible region next bit 16 set to say - Always satisfied !!
Definition at line 906 of file CbcLinked.hpp.
int OsiBiLinear::boundType_ [protected] |
Simple quadratic bound marker.
0 no 1 L if coefficient pos, G if negative i.e. value is ub on xy 2 G if coefficient pos, L if negative i.e. value is lb on xy 3 E If bound then real coefficient is 1.0 and coefficient_ is bound
Definition at line 914 of file CbcLinked.hpp.
int OsiBiLinear::xRow_ [protected] |
x row
Definition at line 916 of file CbcLinked.hpp.
int OsiBiLinear::yRow_ [protected] |
y row (-1 if x*x)
Definition at line 918 of file CbcLinked.hpp.
int OsiBiLinear::xyRow_ [protected] |
Output row.
Definition at line 920 of file CbcLinked.hpp.
int OsiBiLinear::convexity_ [protected] |
Convexity row.
Definition at line 922 of file CbcLinked.hpp.
int OsiBiLinear::numberExtraRows_ [protected] |
Number of extra rows (coefficients to be modified).
Definition at line 924 of file CbcLinked.hpp.
double* OsiBiLinear::multiplier_ [protected] |
Multiplier for coefficient on row.
Definition at line 926 of file CbcLinked.hpp.
int* OsiBiLinear::extraRow_ [protected] |
Row number.
Definition at line 928 of file CbcLinked.hpp.
short OsiBiLinear::chosen_ [mutable, protected] |
Which chosen -1 none, 0 x, 1 y.
Definition at line 930 of file CbcLinked.hpp.