This is to allow the user to replace initialSolve and resolve This version changes coefficients. More...
#include <CbcLinked.hpp>


Public Member Functions | |
Solve methods  | |
| virtual void | initialSolve () | 
| Solve initial LP relaxation.   | |
| virtual void | resolve () | 
| Resolve an LP relaxation after problem modification.   | |
| virtual int | fathom (bool allFixed) | 
| Problem specific Returns -1 if node fathomed and no solution 0 if did nothing 1 if node fathomed and solution allFixed is true if all LinkedBound variables are fixed.   | |
| double * | nonlinearSLP (int numberPasses, double deltaTolerance) | 
| Solves nonlinear problem from CoinModel using SLP - may be used as crash for other algorithms when number of iterations small.   | |
| double | linearizedBAB (CglStored *cut) | 
| Solve linearized quadratic objective branch and bound.   | |
| double * | heuristicSolution (int numberPasses, double deltaTolerance, int mode) | 
| Solves nonlinear problem from CoinModel using SLP - and then tries to get heuristic solution Returns solution array mode - 0 just get continuous 1 round and try normal bab 2 use defaultBound_ to bound integer variables near current solution.   | |
| int | doAOCuts (CglTemporary *cutGen, const double *solution, const double *solution2) | 
| Do OA cuts.   | |
Constructors and destructors  | |
| OsiSolverLink () | |
| Default Constructor.   | |
| OsiSolverLink (CoinModel &modelObject) | |
| This creates from a coinModel object.   | |
| void | load (CoinModel &modelObject, bool tightenBounds=false, int logLevel=1) | 
| Default Constructor.   | |
| virtual OsiSolverInterface * | clone (bool copyData=true) const | 
| Clone.   | |
| OsiSolverLink (const OsiSolverLink &) | |
| Copy constructor.   | |
| OsiSolverLink & | operator= (const OsiSolverLink &rhs) | 
| Assignment operator.   | |
| virtual | ~OsiSolverLink () | 
| Destructor.   | |
Sets and Gets  | |
| void | addBoundModifier (bool upperBoundAffected, bool useUpperBound, int whichVariable, int whichVariableAffected, double multiplier=1.0) | 
| Add a bound modifier.   | |
| int | updateCoefficients (ClpSimplex *solver, CoinPackedMatrix *matrix) | 
| Update coefficients - returns number updated if in updating mode.   | |
| void | analyzeObjects () | 
| Analyze constraints to see which are convex (quadratic).   | |
| void | addTighterConstraints () | 
| Add reformulated bilinear constraints.   | |
| double | bestObjectiveValue () const | 
| Objective value of best solution found internally.   | |
| void | setBestObjectiveValue (double value) | 
| Set objective value of best solution found internally.   | |
| const double * | bestSolution () const | 
| Best solution found internally.   | |
| void | setBestSolution (const double *solution, int numberColumns) | 
| Set best solution found internally.   | |
| void | setSpecialOptions2 (int value) | 
| Set special options.   | |
| void | sayConvex (bool convex) | 
| Say convex (should work it out) - if convex false then strictly concave.   | |
| int | specialOptions2 () const | 
| Get special options.   | |
| CoinPackedMatrix * | cleanMatrix () const | 
| Clean copy of matrix So we can add rows.   | |
| CoinPackedMatrix * | originalRowCopy () const | 
| Row copy of matrix Just genuine columns and rows Linear part.   | |
| ClpSimplex * | quadraticModel () const | 
| Copy of quadratic model if one.   | |
| CoinPackedMatrix * | quadraticRow (int rowNumber, double *linear) const | 
| Gets correct form for a quadratic row - user to delete.   | |
| double | defaultMeshSize () const | 
| Default meshSize.   | |
| void | setDefaultMeshSize (double value) | 
| Add a bound modifier.   | |
| double | defaultBound () const | 
| Default maximumbound.   | |
| void | setDefaultBound (double value) | 
| Add a bound modifier.   | |
| void | setIntegerPriority (int value) | 
| Set integer priority.   | |
| int | integerPriority () const | 
| Get integer priority.   | |
| int | objectiveVariable () const | 
| Objective transfer variable if one.   | |
| void | setBiLinearPriority (int value) | 
| Set biLinear priority.   | |
| int | biLinearPriority () const | 
| Get biLinear priority.   | |
| const CoinModel * | coinModel () const | 
| Return CoinModel.   | |
| void | setBiLinearPriorities (int value, double meshSize=1.0) | 
| Set all biLinear priorities on x-x variables.   | |
| void | setBranchingStrategyOnVariables (int strategyValue, int priorityValue=-1, int mode=7) | 
| Set options and priority on all or some biLinear variables 1 - on I-I 2 - on I-x 4 - on x-x or combinations.   | |
| void | setMeshSizes (double value) | 
| Set all mesh sizes on x-x variables.   | |
| void | setFixedPriority (int priorityValue) | 
| Two tier integer problem where when set of variables with priority less than this are fixed the problem becomes an easier integer problem.   | |
Protected Member Functions | |
functions  | |
| void | gutsOfDestructor (bool justNullify=false) | 
| Do real work of initialize.   | |
| void | gutsOfCopy (const OsiSolverLink &rhs) | 
| Do real work of copy.   | |
Protected Attributes | |
Private member data  | |
| CoinPackedMatrix * | matrix_ | 
| Clean copy of matrix Marked coefficients will be multiplied by L or U.   | |
| CoinPackedMatrix * | originalRowCopy_ | 
| Row copy of matrix Just genuine columns and rows.   | |
| ClpSimplex * | quadraticModel_ | 
| Copy of quadratic model if one.   | |
| int | numberNonLinearRows_ | 
| Number of rows with nonLinearities.   | |
| int * | startNonLinear_ | 
| Starts of lists.   | |
| int * | rowNonLinear_ | 
| Row number for a list.   | |
| int * | convex_ | 
| Indicator whether is convex, concave or neither -1 concave, 0 neither, +1 convex.   | |
| int * | whichNonLinear_ | 
| Indices in a list/row.   | |
| CoinModel | coinModel_ | 
| Model in CoinModel format.   | |
| int | numberVariables_ | 
| Number of variables in tightening phase.   | |
| OsiLinkedBound * | info_ | 
| Information.   | |
| int | specialOptions2_ | 
| 0 bit (1) - call fathom (may do mini B&B) 1 bit (2) - quadratic only in objective (add OA cuts) 2 bit (4) - convex 3 bit (8) - try adding OA cuts 4 bit (16) - add linearized constraints   | |
| int | objectiveRow_ | 
| Objective transfer row if one.   | |
| int | objectiveVariable_ | 
| Objective transfer variable if one.   | |
| double | bestObjectiveValue_ | 
| Objective value of best solution found internally.   | |
| double | defaultMeshSize_ | 
| Default mesh.   | |
| double | defaultBound_ | 
| Default maximum bound.   | |
| double * | bestSolution_ | 
| Best solution found internally.   | |
| int | integerPriority_ | 
| Priority for integers.   | |
| int | biLinearPriority_ | 
| Priority for bilinear.   | |
| int | numberFix_ | 
| Number of variables which when fixed help.   | |
| int * | fixVariables_ | 
| list of fixed variables   | |
This is to allow the user to replace initialSolve and resolve This version changes coefficients.
Definition at line 26 of file CbcLinked.hpp.
| OsiSolverLink::OsiSolverLink | ( | ) | 
Default Constructor.
| OsiSolverLink::OsiSolverLink | ( | CoinModel & | modelObject | ) | 
This creates from a coinModel object.
if errors.then number of sets is -1
This creates linked ordered sets information. It assumes -
for product terms syntax is yy*f(zz) also just f(zz) is allowed and even a constant
modelObject not const as may be changed as part of process.
| OsiSolverLink::OsiSolverLink | ( | const OsiSolverLink & | ) | 
Copy constructor.
| virtual OsiSolverLink::~OsiSolverLink | ( | ) |  [virtual] | 
        
Destructor.
| virtual void OsiSolverLink::initialSolve | ( | ) |  [virtual] | 
        
Solve initial LP relaxation.
Reimplemented from OsiClpSolverInterface.
| virtual void OsiSolverLink::resolve | ( | ) |  [virtual] | 
        
Resolve an LP relaxation after problem modification.
Reimplemented from OsiClpSolverInterface.
| virtual int OsiSolverLink::fathom | ( | bool | allFixed | ) |  [virtual] | 
        
Problem specific Returns -1 if node fathomed and no solution 0 if did nothing 1 if node fathomed and solution allFixed is true if all LinkedBound variables are fixed.
| double* OsiSolverLink::nonlinearSLP | ( | int | numberPasses, | |
| double | deltaTolerance | |||
| ) | 
Solves nonlinear problem from CoinModel using SLP - may be used as crash for other algorithms when number of iterations small.
Also exits if all problematical variables are changing less than deltaTolerance Returns solution array
| double OsiSolverLink::linearizedBAB | ( | CglStored * | cut | ) | 
Solve linearized quadratic objective branch and bound.
Return cutoff and OA cut
| double* OsiSolverLink::heuristicSolution | ( | int | numberPasses, | |
| double | deltaTolerance, | |||
| int | mode | |||
| ) | 
Solves nonlinear problem from CoinModel using SLP - and then tries to get heuristic solution Returns solution array mode - 0 just get continuous 1 round and try normal bab 2 use defaultBound_ to bound integer variables near current solution.
| int OsiSolverLink::doAOCuts | ( | CglTemporary * | cutGen, | |
| const double * | solution, | |||
| const double * | solution2 | |||
| ) | 
Do OA cuts.
| void OsiSolverLink::load | ( | CoinModel & | modelObject, | |
| bool |  tightenBounds = false,  | 
        |||
| int |  logLevel = 1 | |||
| ) | 
Default Constructor.
| virtual OsiSolverInterface* OsiSolverLink::clone | ( | bool |  copyData = true | 
          ) |  const [virtual] | 
        
Clone.
Reimplemented from CbcOsiSolver.
| OsiSolverLink& OsiSolverLink::operator= | ( | const OsiSolverLink & | rhs | ) | 
Assignment operator.
Reimplemented from CbcOsiSolver.
| void OsiSolverLink::addBoundModifier | ( | bool | upperBoundAffected, | |
| bool | useUpperBound, | |||
| int | whichVariable, | |||
| int | whichVariableAffected, | |||
| double |  multiplier = 1.0 | |||
| ) | 
Add a bound modifier.
| int OsiSolverLink::updateCoefficients | ( | ClpSimplex * | solver, | |
| CoinPackedMatrix * | matrix | |||
| ) | 
Update coefficients - returns number updated if in updating mode.
| void OsiSolverLink::analyzeObjects | ( | ) | 
Analyze constraints to see which are convex (quadratic).
| void OsiSolverLink::addTighterConstraints | ( | ) | 
Add reformulated bilinear constraints.
| double OsiSolverLink::bestObjectiveValue | ( | ) |  const [inline] | 
        
Objective value of best solution found internally.
Definition at line 119 of file CbcLinked.hpp.
| void OsiSolverLink::setBestObjectiveValue | ( | double | value | ) |  [inline] | 
        
Set objective value of best solution found internally.
Definition at line 122 of file CbcLinked.hpp.
| const double* OsiSolverLink::bestSolution | ( | ) |  const [inline] | 
        
Best solution found internally.
Definition at line 125 of file CbcLinked.hpp.
| void OsiSolverLink::setBestSolution | ( | const double * | solution, | |
| int | numberColumns | |||
| ) | 
Set best solution found internally.
| void OsiSolverLink::setSpecialOptions2 | ( | int | value | ) |  [inline] | 
        
Set special options.
Definition at line 130 of file CbcLinked.hpp.
| void OsiSolverLink::sayConvex | ( | bool | convex | ) | 
Say convex (should work it out) - if convex false then strictly concave.
| int OsiSolverLink::specialOptions2 | ( | ) |  const [inline] | 
        
Get special options.
Definition at line 135 of file CbcLinked.hpp.
| CoinPackedMatrix* OsiSolverLink::cleanMatrix | ( | ) |  const [inline] | 
        
Clean copy of matrix So we can add rows.
Definition at line 140 of file CbcLinked.hpp.
| CoinPackedMatrix* OsiSolverLink::originalRowCopy | ( | ) |  const [inline] | 
        
Row copy of matrix Just genuine columns and rows Linear part.
Definition at line 146 of file CbcLinked.hpp.
| ClpSimplex* OsiSolverLink::quadraticModel | ( | ) |  const [inline] | 
        
Copy of quadratic model if one.
Definition at line 149 of file CbcLinked.hpp.
| CoinPackedMatrix* OsiSolverLink::quadraticRow | ( | int | rowNumber, | |
| double * | linear | |||
| ) | const | 
Gets correct form for a quadratic row - user to delete.
| double OsiSolverLink::defaultMeshSize | ( | ) |  const [inline] | 
        
Default meshSize.
Definition at line 154 of file CbcLinked.hpp.
| void OsiSolverLink::setDefaultMeshSize | ( | double | value | ) |  [inline] | 
        
Add a bound modifier.
Definition at line 156 of file CbcLinked.hpp.
| double OsiSolverLink::defaultBound | ( | ) |  const [inline] | 
        
Default maximumbound.
Definition at line 159 of file CbcLinked.hpp.
| void OsiSolverLink::setDefaultBound | ( | double | value | ) |  [inline] | 
        
Add a bound modifier.
Definition at line 161 of file CbcLinked.hpp.
| void OsiSolverLink::setIntegerPriority | ( | int | value | ) |  [inline] | 
        
Set integer priority.
Definition at line 164 of file CbcLinked.hpp.
| int OsiSolverLink::integerPriority | ( | ) |  const [inline] | 
        
Get integer priority.
Definition at line 167 of file CbcLinked.hpp.
| int OsiSolverLink::objectiveVariable | ( | ) |  const [inline] | 
        
Objective transfer variable if one.
Definition at line 170 of file CbcLinked.hpp.
| void OsiSolverLink::setBiLinearPriority | ( | int | value | ) |  [inline] | 
        
Set biLinear priority.
Definition at line 173 of file CbcLinked.hpp.
| int OsiSolverLink::biLinearPriority | ( | ) |  const [inline] | 
        
Get biLinear priority.
Definition at line 176 of file CbcLinked.hpp.
| const CoinModel* OsiSolverLink::coinModel | ( | ) |  const [inline] | 
        
Return CoinModel.
Definition at line 179 of file CbcLinked.hpp.
| void OsiSolverLink::setBiLinearPriorities | ( | int | value, | |
| double |  meshSize = 1.0 | |||
| ) | 
Set all biLinear priorities on x-x variables.
| void OsiSolverLink::setBranchingStrategyOnVariables | ( | int | strategyValue, | |
| int |  priorityValue = -1,  | 
        |||
| int |  mode = 7 | |||
| ) | 
Set options and priority on all or some biLinear variables 1 - on I-I 2 - on I-x 4 - on x-x or combinations.
-1 means leave (for priority value and strategy value)
| void OsiSolverLink::setMeshSizes | ( | double | value | ) | 
Set all mesh sizes on x-x variables.
| void OsiSolverLink::setFixedPriority | ( | int | priorityValue | ) | 
Two tier integer problem where when set of variables with priority less than this are fixed the problem becomes an easier integer problem.
| void OsiSolverLink::gutsOfDestructor | ( | bool |  justNullify = false | 
          ) |  [protected] | 
        
Do real work of initialize.
Do real work of delete
| void OsiSolverLink::gutsOfCopy | ( | const OsiSolverLink & | rhs | ) |  [protected] | 
        
Do real work of copy.
CoinPackedMatrix* OsiSolverLink::matrix_ [protected] | 
        
Clean copy of matrix Marked coefficients will be multiplied by L or U.
Definition at line 220 of file CbcLinked.hpp.
CoinPackedMatrix* OsiSolverLink::originalRowCopy_ [protected] | 
        
Row copy of matrix Just genuine columns and rows.
Definition at line 224 of file CbcLinked.hpp.
ClpSimplex* OsiSolverLink::quadraticModel_ [protected] | 
        
Copy of quadratic model if one.
Definition at line 226 of file CbcLinked.hpp.
int OsiSolverLink::numberNonLinearRows_ [protected] | 
        
Number of rows with nonLinearities.
Definition at line 228 of file CbcLinked.hpp.
int* OsiSolverLink::startNonLinear_ [protected] | 
        
Starts of lists.
Definition at line 230 of file CbcLinked.hpp.
int* OsiSolverLink::rowNonLinear_ [protected] | 
        
Row number for a list.
Definition at line 232 of file CbcLinked.hpp.
int* OsiSolverLink::convex_ [protected] | 
        
Indicator whether is convex, concave or neither -1 concave, 0 neither, +1 convex.
Definition at line 236 of file CbcLinked.hpp.
int* OsiSolverLink::whichNonLinear_ [protected] | 
        
Indices in a list/row.
Definition at line 238 of file CbcLinked.hpp.
CoinModel OsiSolverLink::coinModel_ [protected] | 
        
Model in CoinModel format.
Definition at line 240 of file CbcLinked.hpp.
int OsiSolverLink::numberVariables_ [protected] | 
        
Number of variables in tightening phase.
Definition at line 242 of file CbcLinked.hpp.
OsiLinkedBound* OsiSolverLink::info_ [protected] | 
        
Information.
Definition at line 244 of file CbcLinked.hpp.
int OsiSolverLink::specialOptions2_ [protected] | 
        
0 bit (1) - call fathom (may do mini B&B) 1 bit (2) - quadratic only in objective (add OA cuts) 2 bit (4) - convex 3 bit (8) - try adding OA cuts 4 bit (16) - add linearized constraints
Definition at line 252 of file CbcLinked.hpp.
int OsiSolverLink::objectiveRow_ [protected] | 
        
Objective transfer row if one.
Definition at line 254 of file CbcLinked.hpp.
int OsiSolverLink::objectiveVariable_ [protected] | 
        
Objective transfer variable if one.
Definition at line 256 of file CbcLinked.hpp.
double OsiSolverLink::bestObjectiveValue_ [protected] | 
        
Objective value of best solution found internally.
Definition at line 258 of file CbcLinked.hpp.
double OsiSolverLink::defaultMeshSize_ [protected] | 
        
Default mesh.
Definition at line 260 of file CbcLinked.hpp.
double OsiSolverLink::defaultBound_ [protected] | 
        
Default maximum bound.
Definition at line 262 of file CbcLinked.hpp.
double* OsiSolverLink::bestSolution_ [protected] | 
        
Best solution found internally.
Definition at line 264 of file CbcLinked.hpp.
int OsiSolverLink::integerPriority_ [protected] | 
        
Priority for integers.
Definition at line 266 of file CbcLinked.hpp.
int OsiSolverLink::biLinearPriority_ [protected] | 
        
Priority for bilinear.
Definition at line 268 of file CbcLinked.hpp.
int OsiSolverLink::numberFix_ [protected] | 
        
Number of variables which when fixed help.
Definition at line 270 of file CbcLinked.hpp.
int* OsiSolverLink::fixVariables_ [protected] | 
        
list of fixed variables
Definition at line 272 of file CbcLinked.hpp.
 1.6.1