Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OsiBiLinear Class Reference

Define BiLinear objects. More...

#include <CbcLinked.hpp>

+ Inheritance diagram for OsiBiLinear:
+ Collaboration diagram for OsiBiLinear:

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. More...
 
 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. More...
 
 OsiBiLinear (const OsiBiLinear &)
 
virtual OsiObject * clone () const
 Clone. More...
 
OsiBiLinearoperator= (const OsiBiLinear &rhs)
 
virtual ~OsiBiLinear ()
 
virtual double infeasibility (const OsiBranchingInformation *info, int &whichWay) const
 Infeasibility - large is 0.5. More...
 
virtual double feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const
 Set bounds to fix the variable at the current (integer) value. More...
 
virtual OsiBranchingObject * createBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
 Creates a branching object. More...
 
virtual void resetSequenceEtc (int numberColumns, const int *originalColumns)
 Redoes data when sequence numbers change. More...
 
virtual double checkInfeasibility (const OsiBranchingInformation *info) const
 
virtual bool canDoHeuristics () const
 Return true if object can take part in normal heuristics. More...
 
virtual bool boundBranch () const
 Return true if branch should only bound variables. More...
 
int xColumn () const
 X column. More...
 
int yColumn () const
 Y column. More...
 
int xRow () const
 X row. More...
 
int yRow () const
 Y row. More...
 
int xyRow () const
 XY row. More...
 
double coefficient () const
 Coefficient. More...
 
void setCoefficient (double value)
 Set coefficient. More...
 
int firstLambda () const
 First lambda (of 4) More...
 
double xSatisfied () const
 X satisfied if less than this away from mesh. More...
 
void setXSatisfied (double value)
 
double ySatisfied () const
 Y satisfied if less than this away from mesh. More...
 
void setYSatisfied (double value)
 
double xOtherSatisfied () const
 X other satisfied if less than this away from mesh. More...
 
void setXOtherSatisfied (double value)
 
double yOtherSatisfied () const
 Y other satisfied if less than this away from mesh. More...
 
void setYOtherSatisfied (double value)
 
double xMeshSize () const
 X meshSize. More...
 
void setXMeshSize (double value)
 
double yMeshSize () const
 Y meshSize. More...
 
void setYMeshSize (double value)
 
double xySatisfied () const
 XY satisfied if two version differ by less than this. More...
 
void setXYSatisfied (double value)
 
void setMeshSizes (const OsiSolverInterface *solver, double x, double y)
 Set sizes and other stuff. More...
 
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 !! More...
 
void setBranchingStrategy (int value)
 
int boundType () const
 Simple quadratic bound marker. More...
 
void setBoundType (int value)
 
void newBounds (OsiSolverInterface *solver, int way, short xOrY, double separator) const
 Does work of branching. More...
 
int updateCoefficients (const double *lower, const double *upper, double *objective, CoinPackedMatrix *matrix, CoinWarmStartBasis *basis) const
 Updates coefficients - returns number updated. More...
 
double xyCoefficient (const double *solution) const
 Returns true value of single xyRow coefficient. More...
 
void getCoefficients (const OsiSolverInterface *solver, double xB[2], double yB[2], double xybar[4]) const
 Get LU coefficients from matrix. More...
 
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) More...
 
void addExtraRow (int row, double multiplier)
 Adds in data for extra row with variable coefficients. More...
 
void getPseudoShadow (const OsiBranchingInformation *info)
 Sets infeasibility and other when pseudo shadow prices. More...
 
double getMovement (const OsiBranchingInformation *info)
 Gets sum of movements to correct value. More...
 

Protected Member Functions

void computeLambdas (const OsiSolverInterface *solver, double lambda[4]) const
 Compute lambdas if coefficients not changing. More...
 

Protected Attributes

double coefficient_
 data More...
 
double xMeshSize_
 x mesh More...
 
double yMeshSize_
 y mesh More...
 
double xSatisfied_
 x satisfied if less than this away from mesh More...
 
double ySatisfied_
 y satisfied if less than this away from mesh More...
 
double xOtherSatisfied_
 X other satisfied if less than this away from mesh. More...
 
double yOtherSatisfied_
 Y other satisfied if less than this away from mesh. More...
 
double xySatisfied_
 xy satisfied if less than this away from true More...
 
double xyBranchValue_
 value of x or y to branch about More...
 
int xColumn_
 x column More...
 
int yColumn_
 y column More...
 
int firstLambda_
 First lambda (of 4) More...
 
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 !! More...
 
int boundType_
 Simple quadratic bound marker. More...
 
int xRow_
 x row More...
 
int yRow_
 y row (-1 if x*x) More...
 
int xyRow_
 Output row. More...
 
int convexity_
 Convexity row. More...
 
int numberExtraRows_
 Number of extra rows (coefficients to be modified) More...
 
double * multiplier_
 Multiplier for coefficient on row. More...
 
int * extraRow_
 Row number. More...
 
short chosen_
 Which chosen -1 none, 0 x, 1 y. More...
 

Detailed Description

Define BiLinear objects.

This models x*y where one or both are integer

Definition at line 733 of file CbcLinked.hpp.

Constructor & Destructor Documentation

◆ OsiBiLinear() [1/4]

OsiBiLinear::OsiBiLinear ( )

◆ OsiBiLinear() [2/4]

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() [3/4]

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() [4/4]

OsiBiLinear::OsiBiLinear ( const OsiBiLinear )

◆ ~OsiBiLinear()

virtual OsiBiLinear::~OsiBiLinear ( )
virtual

Member Function Documentation

◆ clone()

virtual OsiObject* OsiBiLinear::clone ( ) const
virtual

Clone.

Reimplemented in OsiBiLinearEquality.

◆ operator=()

OsiBiLinear& OsiBiLinear::operator= ( const OsiBiLinear rhs)

◆ infeasibility()

virtual double OsiBiLinear::infeasibility ( const OsiBranchingInformation *  info,
int &  whichWay 
) const
virtual

Infeasibility - large is 0.5.

◆ feasibleRegion()

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.

◆ createBranch()

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.

◆ resetSequenceEtc()

virtual void OsiBiLinear::resetSequenceEtc ( int  numberColumns,
const int *  originalColumns 
)
virtual

Redoes data when sequence numbers change.

◆ checkInfeasibility()

virtual double OsiBiLinear::checkInfeasibility ( const OsiBranchingInformation *  info) const
virtual

◆ canDoHeuristics()

virtual bool OsiBiLinear::canDoHeuristics ( ) const
inlinevirtual

Return true if object can take part in normal heuristics.

Definition at line 797 of file CbcLinked.hpp.

◆ boundBranch()

virtual bool OsiBiLinear::boundBranch ( ) const
inlinevirtual

Return true if branch should only bound variables.

Definition at line 803 of file CbcLinked.hpp.

◆ xColumn()

int OsiBiLinear::xColumn ( ) const
inline

X column.

Definition at line 808 of file CbcLinked.hpp.

◆ yColumn()

int OsiBiLinear::yColumn ( ) const
inline

Y column.

Definition at line 813 of file CbcLinked.hpp.

◆ xRow()

int OsiBiLinear::xRow ( ) const
inline

X row.

Definition at line 818 of file CbcLinked.hpp.

◆ yRow()

int OsiBiLinear::yRow ( ) const
inline

Y row.

Definition at line 823 of file CbcLinked.hpp.

◆ xyRow()

int OsiBiLinear::xyRow ( ) const
inline

XY row.

Definition at line 828 of file CbcLinked.hpp.

◆ coefficient()

double OsiBiLinear::coefficient ( ) const
inline

Coefficient.

Definition at line 833 of file CbcLinked.hpp.

◆ setCoefficient()

void OsiBiLinear::setCoefficient ( double  value)
inline

Set coefficient.

Definition at line 838 of file CbcLinked.hpp.

◆ firstLambda()

int OsiBiLinear::firstLambda ( ) const
inline

First lambda (of 4)

Definition at line 843 of file CbcLinked.hpp.

◆ xSatisfied()

double OsiBiLinear::xSatisfied ( ) const
inline

X satisfied if less than this away from mesh.

Definition at line 848 of file CbcLinked.hpp.

◆ setXSatisfied()

void OsiBiLinear::setXSatisfied ( double  value)
inline

Definition at line 852 of file CbcLinked.hpp.

◆ ySatisfied()

double OsiBiLinear::ySatisfied ( ) const
inline

Y satisfied if less than this away from mesh.

Definition at line 857 of file CbcLinked.hpp.

◆ setYSatisfied()

void OsiBiLinear::setYSatisfied ( double  value)
inline

Definition at line 861 of file CbcLinked.hpp.

◆ xOtherSatisfied()

double OsiBiLinear::xOtherSatisfied ( ) const
inline

X other satisfied if less than this away from mesh.

Definition at line 866 of file CbcLinked.hpp.

◆ setXOtherSatisfied()

void OsiBiLinear::setXOtherSatisfied ( double  value)
inline

Definition at line 870 of file CbcLinked.hpp.

◆ yOtherSatisfied()

double OsiBiLinear::yOtherSatisfied ( ) const
inline

Y other satisfied if less than this away from mesh.

Definition at line 875 of file CbcLinked.hpp.

◆ setYOtherSatisfied()

void OsiBiLinear::setYOtherSatisfied ( double  value)
inline

Definition at line 879 of file CbcLinked.hpp.

◆ xMeshSize()

double OsiBiLinear::xMeshSize ( ) const
inline

X meshSize.

Definition at line 884 of file CbcLinked.hpp.

◆ setXMeshSize()

void OsiBiLinear::setXMeshSize ( double  value)
inline

Definition at line 888 of file CbcLinked.hpp.

◆ yMeshSize()

double OsiBiLinear::yMeshSize ( ) const
inline

Y meshSize.

Definition at line 893 of file CbcLinked.hpp.

◆ setYMeshSize()

void OsiBiLinear::setYMeshSize ( double  value)
inline

Definition at line 897 of file CbcLinked.hpp.

◆ xySatisfied()

double OsiBiLinear::xySatisfied ( ) const
inline

XY satisfied if two version differ by less than this.

Definition at line 902 of file CbcLinked.hpp.

◆ setXYSatisfied()

void OsiBiLinear::setXYSatisfied ( double  value)
inline

Definition at line 906 of file CbcLinked.hpp.

◆ setMeshSizes()

void OsiBiLinear::setMeshSizes ( const OsiSolverInterface *  solver,
double  x,
double  y 
)

Set sizes and other stuff.

◆ branchingStrategy()

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 922 of file CbcLinked.hpp.

◆ setBranchingStrategy()

void OsiBiLinear::setBranchingStrategy ( int  value)
inline

Definition at line 926 of file CbcLinked.hpp.

◆ boundType()

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 937 of file CbcLinked.hpp.

◆ setBoundType()

void OsiBiLinear::setBoundType ( int  value)
inline

Definition at line 941 of file CbcLinked.hpp.

◆ newBounds()

void OsiBiLinear::newBounds ( OsiSolverInterface *  solver,
int  way,
short  xOrY,
double  separator 
) const

Does work of branching.

◆ updateCoefficients()

int OsiBiLinear::updateCoefficients ( const double *  lower,
const double *  upper,
double *  objective,
CoinPackedMatrix *  matrix,
CoinWarmStartBasis *  basis 
) const

Updates coefficients - returns number updated.

◆ xyCoefficient()

double OsiBiLinear::xyCoefficient ( const double *  solution) const

Returns true value of single xyRow coefficient.

◆ getCoefficients()

void OsiBiLinear::getCoefficients ( const OsiSolverInterface *  solver,
double  xB[2],
double  yB[2],
double  xybar[4] 
) const

Get LU coefficients from matrix.

◆ computeLambdas() [1/2]

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)

◆ addExtraRow()

void OsiBiLinear::addExtraRow ( int  row,
double  multiplier 
)

Adds in data for extra row with variable coefficients.

◆ getPseudoShadow()

void OsiBiLinear::getPseudoShadow ( const OsiBranchingInformation *  info)

Sets infeasibility and other when pseudo shadow prices.

◆ getMovement()

double OsiBiLinear::getMovement ( const OsiBranchingInformation *  info)

Gets sum of movements to correct value.

◆ computeLambdas() [2/2]

void OsiBiLinear::computeLambdas ( const OsiSolverInterface *  solver,
double  lambda[4] 
) const
protected

Compute lambdas if coefficients not changing.

Member Data Documentation

◆ coefficient_

double OsiBiLinear::coefficient_
protected

data

Coefficient

Definition at line 969 of file CbcLinked.hpp.

◆ xMeshSize_

double OsiBiLinear::xMeshSize_
protected

x mesh

Definition at line 971 of file CbcLinked.hpp.

◆ yMeshSize_

double OsiBiLinear::yMeshSize_
protected

y mesh

Definition at line 973 of file CbcLinked.hpp.

◆ xSatisfied_

double OsiBiLinear::xSatisfied_
protected

x satisfied if less than this away from mesh

Definition at line 975 of file CbcLinked.hpp.

◆ ySatisfied_

double OsiBiLinear::ySatisfied_
protected

y satisfied if less than this away from mesh

Definition at line 977 of file CbcLinked.hpp.

◆ xOtherSatisfied_

double OsiBiLinear::xOtherSatisfied_
protected

X other satisfied if less than this away from mesh.

Definition at line 979 of file CbcLinked.hpp.

◆ yOtherSatisfied_

double OsiBiLinear::yOtherSatisfied_
protected

Y other satisfied if less than this away from mesh.

Definition at line 981 of file CbcLinked.hpp.

◆ xySatisfied_

double OsiBiLinear::xySatisfied_
protected

xy satisfied if less than this away from true

Definition at line 983 of file CbcLinked.hpp.

◆ xyBranchValue_

double OsiBiLinear::xyBranchValue_
mutableprotected

value of x or y to branch about

Definition at line 985 of file CbcLinked.hpp.

◆ xColumn_

int OsiBiLinear::xColumn_
protected

x column

Definition at line 987 of file CbcLinked.hpp.

◆ yColumn_

int OsiBiLinear::yColumn_
protected

y column

Definition at line 989 of file CbcLinked.hpp.

◆ firstLambda_

int OsiBiLinear::firstLambda_
protected

First lambda (of 4)

Definition at line 991 of file CbcLinked.hpp.

◆ branchingStrategy_

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 1002 of file CbcLinked.hpp.

◆ boundType_

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 1010 of file CbcLinked.hpp.

◆ xRow_

int OsiBiLinear::xRow_
protected

x row

Definition at line 1012 of file CbcLinked.hpp.

◆ yRow_

int OsiBiLinear::yRow_
protected

y row (-1 if x*x)

Definition at line 1014 of file CbcLinked.hpp.

◆ xyRow_

int OsiBiLinear::xyRow_
protected

Output row.

Definition at line 1016 of file CbcLinked.hpp.

◆ convexity_

int OsiBiLinear::convexity_
protected

Convexity row.

Definition at line 1018 of file CbcLinked.hpp.

◆ numberExtraRows_

int OsiBiLinear::numberExtraRows_
protected

Number of extra rows (coefficients to be modified)

Definition at line 1020 of file CbcLinked.hpp.

◆ multiplier_

double* OsiBiLinear::multiplier_
protected

Multiplier for coefficient on row.

Definition at line 1022 of file CbcLinked.hpp.

◆ extraRow_

int* OsiBiLinear::extraRow_
protected

Row number.

Definition at line 1024 of file CbcLinked.hpp.

◆ chosen_

short OsiBiLinear::chosen_
mutableprotected

Which chosen -1 none, 0 x, 1 y.

Definition at line 1026 of file CbcLinked.hpp.


The documentation for this class was generated from the following file: