#include <CbcModel.hpp>
Solve methods | |
void | initialSolve () |
Solve the initial LP relaxation. | |
void | branchAndBound (int doStatistics=0) |
Invoke the branch & cut algorithm. | |
CbcModel * | cleanModel (const double *lower, const double *upper) |
create a clean model from partially fixed problem | |
int | subBranchAndBound (CbcModel *model2, CbcModel *presolvedModel, int maximumNodes) |
Invoke the branch & cut algorithm on partially fixed problem. | |
int | subBranchAndBound (const double *lower, const double *upper, int maximumNodes) |
Invoke the branch & cut algorithm on partially fixed problem. | |
OsiSolverInterface * | strengthenedModel () |
Process root node and return a strengthened model. | |
int | resolve (CbcNodeInfo *parent, int whereFrom) |
Reoptimise an LP relaxation. | |
void | makeGlobalCuts (int numberRows, const int *which) |
Make given rows (L or G) into global cuts and remove from lp. | |
bool | solveWithCuts (OsiCuts &cuts, int numberTries, CbcNode *node) |
Evaluate a subproblem using cutting planes and heuristics. | |
CbcNode ** | solveOneNode (int whichSolver, CbcNode *node, int &numberNodesOutput, int &status) |
Input one node output N nodes to put on tree and optional solution update This should be able to operate in parallel so is given a solver and is const(ish) However we will need to keep an array of solver_ and bases and more status is 0 for normal, 1 if solution Calling code should always push nodes back on tree. | |
void | resizeWhichGenerator (int numberNow, int numberAfter) |
Update size of whichGenerator. | |
Public Types | |
enum | CbcIntParam { CbcMaxNumNode = 0, CbcMaxNumSol, CbcFathomDiscipline, CbcLastIntParam } |
enum | CbcDblParam { CbcIntegerTolerance = 0, CbcInfeasibilityWeight, CbcCutoffIncrement, CbcAllowableGap, CbcAllowableFractionGap, CbcMaximumSeconds, CbcCurrentCutoff, CbcOptimizationDirection, CbcCurrentObjectiveValue, CbcCurrentMinimizationObjectiveValue, CbcStartSeconds, CbcLastDblParam } |
Public Member Functions | |
Presolve methods | |
CbcModel * | findCliques (bool makeEquality, int atLeastThisMany, int lessThanThis, int defaultValue=1000) |
Identify cliques and construct corresponding objects. | |
CbcModel * | integerPresolve (bool weak=false) |
Do integer presolve, creating a new (presolved) model. | |
bool | integerPresolveThisModel (OsiSolverInterface *originalSolver, bool weak=false) |
Do integer presolve, modifying the current model. | |
void | originalModel (CbcModel *presolvedModel, bool weak) |
Put back information into the original model after integer presolve. | |
bool | tightenVubs (int type, bool allowMultipleBinary=false, double useCutoff=1.0e50) |
For variables involved in VUB constraints, see if we can tighten bounds by solving lp's. | |
bool | tightenVubs (int numberVubs, const int *which, double useCutoff=1.0e50) |
For variables involved in VUB constraints, see if we can tighten bounds by solving lp's. | |
void | analyzeObjective () |
Analyze problem to find a minimum change in the objective function. | |
Object manipulation routines | |
int | numberObjects () const |
Get the number of objects. | |
void | setNumberObjects (int number) |
Set the number of objects. | |
CbcObject ** | objects () const |
Get the array of objects. | |
const CbcObject * | object (int which) const |
Get the specified object. | |
CbcObject * | modifiableObject (int which) const |
Get the specified object. | |
void | deleteObjects () |
Delete all object information. | |
void | addObjects (int numberObjects, CbcObject **objects) |
Add in object information. | |
void | synchronizeModel () |
Ensure attached objects point to this model. | |
void | findIntegers (bool startAgain, int type=0) |
Identify integer variables and create corresponding objects. | |
Parameter set/get methods | |
The set methods return true if the parameter was set to the given value, false if the value of the parameter is out of range.
The get methods return the value of the parameter. | |
bool | setIntParam (CbcIntParam key, int value) |
Set an integer parameter. | |
bool | setDblParam (CbcDblParam key, double value) |
Set a double parameter. | |
int | getIntParam (CbcIntParam key) const |
Get an integer parameter. | |
double | getDblParam (CbcDblParam key) const |
Get a double parameter. | |
void | setCutoff (double value) |
Set cutoff bound on the objective function. | |
double | getCutoff () const |
Get the cutoff bound on the objective function - always as minimize. | |
bool | setMaximumNodes (int value) |
Set the maximum node limit . | |
int | getMaximumNodes () const |
Get the maximum node limit . | |
bool | setMaximumSolutions (int value) |
Set the maximum number of solutions desired. | |
int | getMaximumSolutions () const |
Get the maximum number of solutions desired. | |
bool | setMaximumSeconds (double value) |
Set the maximum number of seconds desired. | |
double | getMaximumSeconds () const |
Get the maximum number of seconds desired. | |
double | getCurrentSeconds () const |
Current time since start of branchAndbound. | |
bool | setIntegerTolerance (double value) |
Set the integrality tolerance . | |
double | getIntegerTolerance () const |
Get the integrality tolerance . | |
bool | setInfeasibilityWeight (double value) |
Set the weight per integer infeasibility . | |
double | getInfeasibilityWeight () const |
Get the weight per integer infeasibility . | |
bool | setAllowableGap (double value) |
Set the allowable gap between the best known solution and the best possible solution. | |
double | getAllowableGap () const |
Get the allowable gap between the best known solution and the best possible solution. | |
bool | setAllowableFractionGap (double value) |
Set the fraction allowable gap between the best known solution and the best possible solution. | |
double | getAllowableFractionGap () const |
Get the fraction allowable gap between the best known solution and the best possible solution. | |
bool | setAllowablePercentageGap (double value) |
Set the percentage allowable gap between the best known solution and the best possible solution. | |
double | getAllowablePercentageGap () const |
Get the percentage allowable gap between the best known solution and the best possible solution. | |
bool | setCutoffIncrement (double value) |
Set the desired. | |
double | getCutoffIncrement () const |
Get the desired. | |
void | setHotstartSolution (const double *solution, const int *priorities=NULL) |
Pass in target solution and optional priorities. | |
void | setMinimumDrop (double value) |
Set the minimum drop to continue cuts. | |
double | getMinimumDrop () const |
Get the minimum drop to continue cuts. | |
void | setMaximumCutPassesAtRoot (int value) |
Set the maximum number of cut passes at root node (default 20) Minimum drop can also be used for fine tuning. | |
int | getMaximumCutPassesAtRoot () const |
Get the maximum number of cut passes at root node. | |
void | setMaximumCutPasses (int value) |
Set the maximum number of cut passes at other nodes (default 10) Minimum drop can also be used for fine tuning. | |
int | getMaximumCutPasses () const |
Get the maximum number of cut passes at other nodes (default 10). | |
int | getCurrentPassNumber () const |
Get current cut pass number in this round of cuts. | |
void | setNumberStrong (int number) |
Set the maximum number of candidates to be evaluated for strong branching. | |
int | numberStrong () const |
Get the maximum number of candidates to be evaluated for strong branching. | |
void | setSizeMiniTree (int value) |
Set size of mini - tree. | |
int | sizeMiniTree () const |
Set an integer parameter. | |
void | setNumberBeforeTrust (int number) |
Set the number of branches before pseudo costs believed in dynamic strong branching. | |
int | numberBeforeTrust () const |
get the number of branches before pseudo costs believed in dynamic strong branching. | |
void | setNumberPenalties (int number) |
Set the number of variables for which to compute penalties in dynamic strong branching. | |
int | numberPenalties () const |
get the number of variables for which to compute penalties in dynamic strong branching. | |
void | setNumberAnalyzeIterations (int number) |
Number of analyze iterations to do. | |
int | numberAnalyzeIterations () const |
Set an integer parameter. | |
double | penaltyScaleFactor () const |
Get scale factor to make penalties match strong. | |
void | setPenaltyScaleFactor (double value) |
Set scale factor to make penalties match strong. | |
void | setProblemType (int number) |
Problem type as set by user or found by analysis. | |
int | problemType () const |
Set an integer parameter. | |
void | setHowOftenGlobalScan (int number) |
Set how often to scan global cuts. | |
int | howOftenGlobalScan () const |
Get how often to scan global cuts. | |
int * | originalColumns () const |
Original columns as created by integerPresolve. | |
void | setPrintFrequency (int number) |
Set the print frequency. | |
int | printFrequency () const |
Get the print frequency. | |
Methods returning info on how the solution process terminated | |
bool | isAbandoned () const |
Are there a numerical difficulties? | |
bool | isProvenOptimal () const |
Is optimality proven? | |
bool | isProvenInfeasible () const |
Is infeasiblity proven (or none better than cutoff)? | |
bool | isNodeLimitReached () const |
Node limit reached? | |
bool | isSecondsLimitReached () const |
Time limit reached? | |
bool | isSolutionLimitReached () const |
Solution limit reached? | |
int | getIterationCount () const |
Get how many iterations it took to solve the problem. | |
int | getNodeCount () const |
Get how many Nodes it took to solve the problem. | |
int | status () const |
Final status of problem Some of these can be found out by is...... | |
int | secondaryStatus () const |
Secondary status of problem -1 unset (status_ will also be -1) 0 search completed with solution 1 linear relaxation not feasible (or worse than cutoff) 2 stopped on gap 3 stopped on nodes 4 stopped on time 5 stopped on user event 6 stopped on solutions. | |
bool | isInitialSolveAbandoned () const |
Are there numerical difficulties (for initialSolve) ? | |
bool | isInitialSolveProvenOptimal () const |
Is optimality proven (for initialSolve) ? | |
bool | isInitialSolveProvenPrimalInfeasible () const |
Is primal infeasiblity proven (for initialSolve) ? | |
bool | isInitialSolveProvenDualInfeasible () const |
Is dual infeasiblity proven (for initialSolve) ? | |
Problem information methods | |
These methods call the solver's query routines to return information about the problem referred to by the current object. Querying a problem that has no data associated with it result in zeros for the number of rows and columns, and NULL pointers from the methods that return vectors.
Const pointers returned from any data-query method are valid as long as the data is unchanged and the solver is not called. | |
int | numberRowsAtContinuous () const |
Number of rows in continuous (root) problem. | |
int | getNumCols () const |
Get number of columns. | |
int | getNumRows () const |
Get number of rows. | |
CoinBigIndex | getNumElements () const |
Get number of nonzero elements. | |
int | numberIntegers () const |
Number of integers in problem. | |
const int * | integerVariable () const |
Number of rows in continuous (root) problem. | |
const char | integerType (int i) const |
Whether or not integer. | |
const char * | integerType () const |
Whether or not integer. | |
const double * | getColLower () const |
Get pointer to array[getNumCols()] of column lower bounds. | |
const double * | getColUpper () const |
Get pointer to array[getNumCols()] of column upper bounds. | |
const char * | getRowSense () const |
Get pointer to array[getNumRows()] of row constraint senses. | |
const double * | getRightHandSide () const |
Get pointer to array[getNumRows()] of rows right-hand sides. | |
const double * | getRowRange () const |
Get pointer to array[getNumRows()] of row ranges. | |
const double * | getRowLower () const |
Get pointer to array[getNumRows()] of row lower bounds. | |
const double * | getRowUpper () const |
Get pointer to array[getNumRows()] of row upper bounds. | |
const double * | getObjCoefficients () const |
Get pointer to array[getNumCols()] of objective function coefficients. | |
double | getObjSense () const |
Get objective function sense (1 for min (default), -1 for max). | |
bool | isContinuous (int colIndex) const |
Return true if variable is continuous. | |
bool | isBinary (int colIndex) const |
Return true if variable is binary. | |
bool | isInteger (int colIndex) const |
Return true if column is integer. | |
bool | isIntegerNonBinary (int colIndex) const |
Return true if variable is general integer. | |
bool | isFreeBinary (int colIndex) const |
Return true if variable is binary and not fixed at either bound. | |
const CoinPackedMatrix * | getMatrixByRow () const |
Get pointer to row-wise copy of matrix. | |
const CoinPackedMatrix * | getMatrixByCol () const |
Get pointer to column-wise copy of matrix. | |
double | getInfinity () const |
Get solver's value for infinity. | |
const double * | getCbcColLower () const |
Get pointer to array[getNumCols()] (for speed) of column lower bounds. | |
const double * | getCbcColUpper () const |
Get pointer to array[getNumCols()] (for speed) of column upper bounds. | |
const double * | getCbcRowLower () const |
Get pointer to array[getNumRows()] (for speed) of row lower bounds. | |
const double * | getCbcRowUpper () const |
Get pointer to array[getNumRows()] (for speed) of row upper bounds. | |
const double * | getCbcColSolution () const |
Get pointer to array[getNumCols()] (for speed) of primal solution vector. | |
const double * | getCbcRowPrice () const |
Get pointer to array[getNumRows()] (for speed) of dual prices. | |
const double * | getCbcReducedCost () const |
Get a pointer to array[getNumCols()] (for speed) of reduced costs. | |
const double * | getCbcRowActivity () const |
Get pointer to array[getNumRows()] (for speed) of row activity levels. | |
Methods related to querying the solution | |
double * | continuousSolution () const |
Holds solution at continuous (after cuts if branchAndBound called). | |
int * | usedInSolution () const |
Array marked whenever a solution is found if non-zero. | |
void | incrementUsed (const double *solution) |
Increases usedInSolution for nonzeros. | |
void | setBestSolution (CBC_Message how, double &objectiveValue, const double *solution, bool fixVariables=false) |
Record a new incumbent solution and update objectiveValue. | |
void | setBestObjectiveValue (double objectiveValue) |
Just update objectiveValue. | |
double | checkSolution (double cutoff, const double *solution, bool fixVariables, double originalObjValue) |
Call this to really test if a valid solution can be feasible Solution is number columns in size. | |
bool | feasibleSolution (int &numberIntegerInfeasibilities, int &numberObjectInfeasibilities) const |
Test the current solution for feasiblility. | |
double * | currentSolution () const |
Solution to the most recent lp relaxation. | |
const double * | testSolution () const |
For testing infeasibilities - will point to currentSolution_ or solver-->getColSolution(). | |
void | setTestSolution (const double *solution) |
Holds solution at continuous (after cuts if branchAndBound called). | |
void | reserveCurrentSolution (const double *solution=NULL) |
Make sure region there and optionally copy solution. | |
const double * | getColSolution () const |
Get pointer to array[getNumCols()] of primal solution vector. | |
const double * | getRowPrice () const |
Get pointer to array[getNumRows()] of dual prices. | |
const double * | getReducedCost () const |
Get a pointer to array[getNumCols()] of reduced costs. | |
const double * | getRowActivity () const |
Get pointer to array[getNumRows()] of row activity levels. | |
double | getCurrentObjValue () const |
Get current objective function value. | |
double | getCurrentMinimizationObjValue () const |
Get current minimization objective function value. | |
double | getMinimizationObjValue () const |
Get best objective function value as minimization. | |
void | setMinimizationObjValue (double value) |
Set best objective function value as minimization. | |
double | getObjValue () const |
Get best objective function value. | |
double | getBestPossibleObjValue () const |
Get best possible objective function value. | |
void | setObjValue (double value) |
Set best objective function value. | |
double * | bestSolution () const |
The best solution to the integer programming problem. | |
int | getSolutionCount () const |
Get number of solutions. | |
void | setSolutionCount (int value) |
Set number of solutions (so heuristics will be different). | |
int | phase () const |
Current phase (so heuristics etc etc can find out). | |
int | getNumberHeuristicSolutions () const |
Get number of heuristic solutions. | |
void | setObjSense (double s) |
Set objective function sense (1 for min (default), -1 for max,). | |
double | getContinuousObjective () const |
Value of objective at continuous. | |
void | setContinuousObjective (double value) |
Holds solution at continuous (after cuts if branchAndBound called). | |
int | getContinuousInfeasibilities () const |
Number of infeasibilities at continuous. | |
void | setContinuousInfeasibilities (int value) |
Holds solution at continuous (after cuts if branchAndBound called). | |
double | rootObjectiveAfterCuts () const |
Value of objective after root node cuts added. | |
double | sumChangeObjective () const |
Sum of Changes to objective by first solve. | |
int | numberGlobalViolations () const |
Number of times global cuts violated. | |
void | clearNumberGlobalViolations () |
Holds solution at continuous (after cuts if branchAndBound called). | |
bool | resolveAfterTakeOffCuts () const |
Whether to force a resolve after takeOffCuts. | |
void | setResolveAfterTakeOffCuts (bool yesNo) |
Holds solution at continuous (after cuts if branchAndBound called). | |
Node selection | |
CbcCompareBase * | nodeComparison () const |
void | setNodeComparison (CbcCompareBase *compare) |
void | setNodeComparison (CbcCompareBase &compare) |
Problem feasibility checking | |
CbcFeasibilityBase * | problemFeasibility () const |
void | setProblemFeasibility (CbcFeasibilityBase *feasibility) |
void | setProblemFeasibility (CbcFeasibilityBase &feasibility) |
Tree methods and subtree methods | |
CbcTree * | tree () const |
Tree method e.g. heap (which may be overridden by inheritance). | |
void | passInTreeHandler (CbcTree &tree) |
For modifying tree handling (original is cloned). | |
void | passInSubTreeModel (CbcModel &model) |
For passing in an CbcModel to do a sub Tree (with derived tree handlers). | |
CbcModel * | subTreeModel (OsiSolverInterface *solver=NULL) const |
For retrieving a copy of subtree model with given OsiSolver. | |
int | numberStoppedSubTrees () const |
Returns number of times any subtree stopped on nodes, time etc. | |
void | incrementSubTreeStopped () |
Says a sub tree was stopped. | |
int | typePresolve () const |
Whether to automatically do presolve before branch and bound (subTrees). | |
void | setTypePresolve (int value) |
Tree method e.g. heap (which may be overridden by inheritance). | |
Branching Decisions | |
CbcBranchDecision * | branchingMethod () const |
Get the current branching decision method. | |
void | setBranchingMethod (CbcBranchDecision *method) |
Set the branching decision method. | |
void | setBranchingMethod (CbcBranchDecision &method) |
Set the branching method. | |
Row (constraint) and Column (variable) cut generation | |
int | stateOfSearch () const |
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no solution but many nodes. | |
void | setStateOfSearch (int state) |
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no solution but many nodes. | |
int | searchStrategy () const |
Strategy worked out - mainly at root node for use by CbcNode. | |
void | setSearchStrategy (int value) |
Set strategy worked out - mainly at root node for use by CbcNode. | |
int | numberCutGenerators () const |
Get the number of cut generators. | |
CbcCutGenerator ** | cutGenerators () const |
Get the list of cut generators. | |
CbcCutGenerator * | cutGenerator (int i) const |
Get the specified cut generator. | |
CbcCutGenerator * | virginCutGenerator (int i) const |
Get the specified cut generator before any changes. | |
void | addCutGenerator (CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false, int howOftenInSub=-100, int whatDepth=-1, int whatDepthInSub=-1) |
Add one generator - up to user to delete generators. | |
Strategy and sub models | |
CbcStrategy * | strategy () const |
Get the current strategy. | |
void | setStrategy (CbcStrategy &strategy) |
Set the strategy. Clones. | |
CbcModel * | parentModel () const |
Get the current parent model. | |
void | setParentModel (CbcModel &parentModel) |
Set the parent model. | |
Heuristics and priorities | |
void | addHeuristic (CbcHeuristic *generator) |
Add one heuristic - up to user to delete. | |
CbcHeuristic * | heuristic (int i) const |
Get the specified heuristic. | |
int | numberHeuristics () const |
Get the number of heuristics. | |
CbcHeuristic * | lastHeuristic () const |
Pointer to heuristic solver which found last solution (or NULL). | |
void | setLastHeuristic (CbcHeuristic *last) |
set last heuristic which found a solution | |
void | passInPriorities (const int *priorities, bool ifNotSimpleIntegers) |
Pass in branching priorities. | |
int | priority (int sequence) const |
Returns priority level for an object (or 1000 if no priorities exist). | |
void | passInEventHandler (const CbcEventHandler *eventHandler) |
Set an event handler. | |
CbcEventHandler * | getEventHandler () const |
Retrieve a pointer to the event handler. | |
Setting/Accessing application data | |
void | setApplicationData (void *appData) |
Set application data. | |
void * | getApplicationData () const |
Get application data. | |
void | passInSolverCharacteristics (OsiBabSolver *solverCharacteristics) |
For advanced applications you may wish to modify the behavior of Cbc e.g. | |
Message handling | |
void | passInMessageHandler (CoinMessageHandler *handler) |
Pass in Message handler (not deleted at end). | |
void | newLanguage (CoinMessages::Language language) |
Set language. | |
void | setLanguage (CoinMessages::Language language) |
Pass in Message handler (not deleted at end). | |
CoinMessageHandler * | messageHandler () const |
Return handler. | |
CoinMessages | messages () |
Return messages. | |
CoinMessages * | messagesPointer () |
Return pointer to messages. | |
void | setLogLevel (int value) |
Set log level. | |
int | logLevel () const |
Get log level. | |
Specialized | |
void | setSpecialOptions (int value) |
Set special options. | |
int | specialOptions () const |
Get special options. | |
Constructors and destructors etc | |
CbcModel () | |
Default Constructor. | |
CbcModel (const OsiSolverInterface &) | |
Constructor from solver. | |
void | assignSolver (OsiSolverInterface *&solver, bool deleteSolver=true) |
Assign a solver to the model (model assumes ownership). | |
CbcModel (const CbcModel &rhs, bool noTree=false) | |
Copy constructor . | |
CbcModel & | operator= (const CbcModel &rhs) |
Assignment operator. | |
~CbcModel () | |
Destructor. | |
OsiSolverInterface * | solver () const |
Returns solver - has current state. | |
OsiSolverInterface * | continuousSolver () const |
Returns solver with continuous state. | |
OsiSolverInterface * | referenceSolver () const |
A copy of the solver, taken at constructor or by saveReferenceSolver. | |
void | saveReferenceSolver () |
Save a copy of the current solver so can be reset to. | |
void | resetToReferenceSolver () |
Uses a copy of reference solver to be current solver. | |
void | gutsOfDestructor () |
Clears out as much as possible (except solver). | |
void | gutsOfDestructor2 () |
Clears out enough to reset CbcModel as if no branch and bound done. | |
int | getNodeCount2 () const |
Get how many Nodes it took to solve the problem. | |
void | setPointers (const OsiSolverInterface *solver) |
Set pointers for speed. | |
int | reducedCostFix () |
Perform reduced cost fixing. | |
CoinWarmStartBasis * | getEmptyBasis (int ns=0, int na=0) const |
Return an empty basis object of the specified size. | |
void | takeOffCuts (OsiCuts &cuts, bool allowResolve, OsiCuts *saveCuts) |
Remove inactive cuts from the model. | |
int | addCuts (CbcNode *node, CoinWarmStartBasis *&lastws, bool canFix) |
Determine and install the active cuts that need to be added for the current subproblem. | |
void | addCuts1 (CbcNode *node, CoinWarmStartBasis *&lastws) |
Traverse the tree from node to root and prep the model. | |
void | setObjectiveValue (CbcNode *thisNode, const CbcNode *parentNode) const |
Set objective value in a node. | |
void | convertToDynamic () |
If numberBeforeTrust >0 then we are going to use CbcBranchDynamic. | |
int | cliquePseudoCosts (int doStatistics) |
Use cliques for pseudocost information - return nonzero if infeasible. | |
void | pseudoShadow (double *down, double *up) |
Fill in useful estimates. | |
const double * | hotstartSolution () const |
Get the hotstart solution. | |
const int * | hotstartPriorities () const |
Get the hotstart priorities. | |
CbcCountRowCut ** | addedCuts () const |
Return the list of cuts initially collected for this subproblem. | |
int | currentNumberCuts () const |
Number of entries in the list returned by addedCuts(). | |
OsiCuts * | globalCuts () |
Global cuts. | |
void | setNextRowCut (const OsiRowCut &cut) |
Copy and set a pointer to a row cut which will be added instead of normal branching. | |
CbcNode * | currentNode () const |
Get a pointer to current node (be careful). | |
void | setNumberStrongIterations (int number) |
Set the number of iterations done in strong branching. | |
int | numberStrongIterations () const |
Get the number of iterations done in strong branching. | |
void | incrementStrongInfo (int numberTimes, int numberIterations, int numberFixed, bool ifInfeasible) |
Increment strong info. | |
void | generateCpp (FILE *fp, int options) |
Create C++ lines to get to current state. | |
Private Attributes | |
Private member data | |
OsiSolverInterface * | solver_ |
The solver associated with this model. | |
bool | ourSolver_ |
Ownership of the solver object. | |
OsiSolverInterface * | continuousSolver_ |
A copy of the solver, taken at the continuous (root) node. | |
OsiSolverInterface * | referenceSolver_ |
A copy of the solver, taken at constructor or by saveReferenceSolver. | |
CoinMessageHandler * | handler_ |
Message handler. | |
bool | defaultHandler_ |
Flag to say if handler_ is the default handler. | |
CoinMessages | messages_ |
Cbc messages. | |
int | intParam_ [CbcLastIntParam] |
Array for integer parameters. | |
double | dblParam_ [CbcLastDblParam] |
Array for double parameters. | |
CoinWarmStart * | emptyWarmStart_ |
Pointer to an empty warm start object. | |
double | bestObjective_ |
Best objective. | |
double | bestPossibleObjective_ |
Best possible objective. | |
double | sumChangeObjective1_ |
Sum of Changes to objective by first solve. | |
double | sumChangeObjective2_ |
Sum of Changes to objective by subsequent solves. | |
double * | bestSolution_ |
Array holding the incumbent (best) solution. | |
double * | currentSolution_ |
Array holding the current solution. | |
const double * | testSolution_ |
For testing infeasibilities - will point to currentSolution_ or solver-->getColSolution(). | |
OsiCuts | globalCuts_ |
Global cuts. | |
double | minimumDrop_ |
Minimum degradation in objective value to continue cut generation. | |
int | numberSolutions_ |
Number of solutions. | |
int | stateOfSearch_ |
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no solution but many nodes. | |
double * | hotstartSolution_ |
Hotstart solution. | |
int * | hotstartPriorities_ |
Hotstart priorities. | |
int | numberHeuristicSolutions_ |
Number of heuristic solutions. | |
int | numberNodes_ |
Cumulative number of nodes. | |
int | numberNodes2_ |
Cumulative number of nodes for statistics. | |
int | numberIterations_ |
Cumulative number of iterations. | |
int | status_ |
Status of problem - 0 finished, 1 stopped, 2 difficulties. | |
int | secondaryStatus_ |
Secondary status of problem -1 unset (status_ will also be -1) 0 search completed with solution 1 linear relaxation not feasible (or worse than cutoff) 2 stopped on gap 3 stopped on nodes 4 stopped on time 5 stopped on user event 6 stopped on solutions. | |
int | numberIntegers_ |
Number of integers in problem. | |
int | numberRowsAtContinuous_ |
Number of rows at continuous. | |
int | maximumNumberCuts_ |
Maximum number of cuts. | |
int | phase_ |
Current phase (so heuristics etc etc can find out). | |
int | currentNumberCuts_ |
Number of entries in addedCuts_. | |
int | maximumDepth_ |
Current limit on search tree depth. | |
CbcNodeInfo ** | walkback_ |
Array used to assemble the path between a node and the search tree root. | |
CbcCountRowCut ** | addedCuts_ |
The list of cuts initially collected for this subproblem. | |
OsiRowCut * | nextRowCut_ |
A pointer to a row cut which will be added instead of normal branching. | |
CbcNode * | currentNode_ |
Current node so can be used elsewhere. | |
int * | integerVariable_ |
Indices of integer variables. | |
char * | integerInfo_ |
Whether of not integer. | |
double * | continuousSolution_ |
Holds solution at continuous (after cuts). | |
int * | usedInSolution_ |
Array marked whenever a solution is found if non-zero. | |
int | specialOptions_ |
0 bit (1) - check if cuts valid (if on debugger list) 1 bit (2) - use current basis to check integer solution (rather than all slack) 2 bit (4) - don't check integer solution 3 bit (8) - Strong is doing well - keep on | |
CbcCompareBase * | nodeCompare_ |
User node comparison function. | |
CbcFeasibilityBase * | problemFeasibility_ |
User feasibility function (see CbcFeasibleBase.hpp). | |
CbcTree * | tree_ |
Tree. | |
CbcModel * | subTreeModel_ |
A pointer to model to be used for subtrees. | |
int | numberStoppedSubTrees_ |
Number of times any subtree stopped on nodes, time etc. | |
CbcBranchDecision * | branchingMethod_ |
Variable selection function. | |
CbcStrategy * | strategy_ |
Strategy. | |
CbcModel * | parentModel_ |
Parent model. | |
const double * | cbcColLower_ |
Pointer to array[getNumCols()] (for speed) of column lower bounds. | |
const double * | cbcColUpper_ |
Pointer to array[getNumCols()] (for speed) of column upper bounds. | |
const double * | cbcRowLower_ |
Pointer to array[getNumRows()] (for speed) of row lower bounds. | |
const double * | cbcRowUpper_ |
Pointer to array[getNumRows()] (for speed) of row upper bounds. | |
const double * | cbcColSolution_ |
Pointer to array[getNumCols()] (for speed) of primal solution vector. | |
const double * | cbcRowPrice_ |
Pointer to array[getNumRows()] (for speed) of dual prices. | |
const double * | cbcReducedCost_ |
Get a pointer to array[getNumCols()] (for speed) of reduced costs. | |
const double * | cbcRowActivity_ |
Pointer to array[getNumRows()] (for speed) of row activity levels. | |
void * | appData_ |
Pointer to user-defined data structure. | |
int | presolve_ |
Pointer to. | |
int | numberStrong_ |
Maximum number of candidates to consider for strong branching. | |
int | numberBeforeTrust_ |
The number of branches before pseudo costs believed in dynamic strong branching. | |
int | numberPenalties_ |
The number of variable sfor which to compute penalties in dynamic strong branching. | |
double | penaltyScaleFactor_ |
Scale factor to make penalties match strong. | |
int | numberAnalyzeIterations_ |
Number of analyze iterations to do. | |
double * | analyzeResults_ |
Arrays with analysis results. | |
int | numberInfeasibleNodes_ |
Number of nodes infeasible by normal branching (before cuts). | |
int | problemType_ |
Problem type as set by user or found by analysis. | |
int | printFrequency_ |
Print frequency. | |
int | numberCutGenerators_ |
Number of cut generators. | |
CbcCutGenerator ** | generator_ |
The solver associated with this model. | |
CbcCutGenerator ** | virginGenerator_ |
The solver associated with this model. | |
int | numberHeuristics_ |
Number of heuristics. | |
CbcHeuristic ** | heuristic_ |
Heuristic solvers. | |
CbcHeuristic * | lastHeuristic_ |
Pointer to heuristic solver which found last solution (or NULL). | |
CbcEventHandler * | eventHandler_ |
int | numberObjects_ |
Total number of objects. | |
CbcObject ** | object_ |
Integer and Clique and ... information. | |
int * | originalColumns_ |
Original columns as created by integerPresolve. | |
int | howOftenGlobalScan_ |
How often to scan global cuts. | |
int | numberGlobalViolations_ |
Number of times global cuts violated. | |
double | continuousObjective_ |
Value of objective at continuous (Well actually after initial round of cuts). | |
double | originalContinuousObjective_ |
Value of objective before root node cuts added. | |
int | continuousInfeasibilities_ |
Number of infeasibilities at continuous. | |
int | maximumCutPassesAtRoot_ |
Maximum number of cut passes at root. | |
int | maximumCutPasses_ |
Maximum number of cut passes. | |
int | currentPassNumber_ |
Current cut pass number. | |
int | maximumWhich_ |
Maximum number of cuts (for whichGenerator_). | |
int * | whichGenerator_ |
Which cut generator generated this cut. | |
int | maximumStatistics_ |
Maximum number of statistics. | |
CbcStatistics ** | statistics_ |
statistics | |
int | numberFixedAtRoot_ |
Number of fixed by analyze at root. | |
int | numberFixedNow_ |
Number fixed by analyze so far. | |
bool | stoppedOnGap_ |
Whether stopping on gap. | |
bool | eventHappened_ |
Whether event happened. | |
int | numberLongStrong_ |
Number of long strong goes. | |
int | numberOldActiveCuts_ |
Number of old active cuts. | |
int | numberNewCuts_ |
Number of new cuts. | |
int | sizeMiniTree_ |
Size of mini - tree. | |
int | searchStrategy_ |
Strategy worked out - mainly at root node. | |
int | numberStrongIterations_ |
Number of iterations in strong branching. | |
int | strongInfo_ [3] |
0 - number times strong branching done, 1 - number fixed, 2 - number infeasible | |
OsiBabSolver * | solverCharacteristics_ |
For advanced applications you may wish to modify the behavior of Cbc e.g. | |
bool | resolveAfterTakeOffCuts_ |
Whether to force a resolve after takeOffCuts. |
The initialSolve() method solves the initial LP relaxation of the MIP problem. The branchAndBound() method can then be called to finish using a branch and cut algorithm.
Subproblems (aka nodes) requiring additional evaluation are stored using the CbcNode and CbcNodeInfo objects. Ancestry linkage is maintained in the CbcNodeInfo object. Evaluation of a subproblem within branchAndBound() proceeds as follows:
For a typical subproblem, the sequence of events is as follows:
Definition at line 84 of file CbcModel.hpp.
|
Definition at line 88 of file CbcModel.hpp. |
|
Definition at line 107 of file CbcModel.hpp. |
|
Default Constructor.
|
|
Constructor from solver.
|
|
Copy constructor . If noTree is true then tree and cuts are not copied |
|
Destructor.
|
|
Solve the initial LP relaxation. Invoke the solver's initialSolve() method. |
|
Invoke the branch & cut algorithm. The method assumes that initialSolve() has been called to solve the LP relaxation. It processes the root node, then proceeds to explore the branch & cut search tree. The search ends when the tree is exhausted or one of several execution limits is reached. If doStatistics is 1 summary statistics are printed if 2 then also the path to best solution (if found by branching) if 3 then also one line per node |
|
create a clean model from partially fixed problem The method creates a new model with given bounds and with no tree. |
|
Invoke the branch & cut algorithm on partially fixed problem. The method presolves the given model and does branch and cut. The search ends when the tree is exhausted or maximum nodes is reached. If better solution found then it is saved. Returns 0 if search completed and solution, 1 if not completed and solution, 2 if completed and no solution, 3 if not completed and no solution. Normally okay to do cleanModel immediately followed by subBranchandBound (== other form of subBranchAndBound) but may need to get at model for advanced features. Deletes model2 |
|
Invoke the branch & cut algorithm on partially fixed problem. The method creates a new model with given bounds, presolves it then proceeds to explore the branch & cut search tree. The search ends when the tree is exhausted or maximum nodes is reached. If better solution found then it is saved. Returns 0 if search completed and solution, 1 if not completed and solution, 2 if completed and no solution, 3 if not completed and no solution. This is just subModel immediately followed by other version of subBranchandBound. |
|
Process root node and return a strengthened model. The method assumes that initialSolve() has been called to solve the LP relaxation. It processes the root node and then returns a pointer to the strengthened model (or NULL if infeasible) |
|
Evaluate a subproblem using cutting planes and heuristics. The method invokes a main loop which generates cuts, applies heuristics, and reoptimises using the solver's native resolve() method. It returns true if the subproblem remains feasible at the end of the evaluation. |
|
Input one node output N nodes to put on tree and optional solution update This should be able to operate in parallel so is given a solver and is const(ish) However we will need to keep an array of solver_ and bases and more status is 0 for normal, 1 if solution Calling code should always push nodes back on tree.
|
|
Update size of whichGenerator.
|
|
Reoptimise an LP relaxation. Invoke the solver's resolve() method. whereFrom - 0 - initial continuous 1 - resolve on branch (before new cuts) 2 - after new cuts 3 - obsolete code or something modified problem in unexpected way 10 - after strong branching has fixed variables at root 11 - after strong branching has fixed variables in tree returns 1 feasible, 0 infeasible, -1 feasible but skip cuts |
|
Make given rows (L or G) into global cuts and remove from lp.
|
|
Identify cliques and construct corresponding objects.
Find cliques with size in the range [ |
|
Do integer presolve, creating a new (presolved) model. Returns the new model, or NULL if feasibility is lost. If weak is true then just does a normal presolve
|
|
Do integer presolve, modifying the current model. Returns true if the model remains feasible after presolve. |
|
Put back information into the original model after integer presolve.
|
|
For variables involved in VUB constraints, see if we can tighten bounds by solving lp's. Returns false if feasibility is lost. If CglProbing is available, it will be tried as well to see if it can tighten bounds. This routine is just a front end for tightenVubs(int,const int*,double).
If
If
If |
|
For variables involved in VUB constraints, see if we can tighten bounds by solving lp's. This version is just handed a list of variables to be processed. |
|
Analyze problem to find a minimum change in the objective function.
|
|
Get the number of objects.
Definition at line 341 of file CbcModel.hpp. |
|
Set the number of objects.
Definition at line 343 of file CbcModel.hpp. |
|
Get the array of objects.
Definition at line 347 of file CbcModel.hpp. |
|
Get the specified object.
Definition at line 350 of file CbcModel.hpp. |
|
Get the specified object.
Definition at line 352 of file CbcModel.hpp. |
|
Delete all object information.
|
|
Add in object information. Objects are cloned; the owner can delete the originals. |
|
Ensure attached objects point to this model.
|
|
Identify integer variables and create corresponding objects.
Record integer variables and create an CbcSimpleInteger object for each one. If |
|
Set an integer parameter.
Definition at line 391 of file CbcModel.hpp. |
|
Set a double parameter.
Definition at line 396 of file CbcModel.hpp. |
|
Get an integer parameter.
Definition at line 401 of file CbcModel.hpp. |
|
Get a double parameter.
Definition at line 405 of file CbcModel.hpp. |
|
Set cutoff bound on the objective function. When using strict comparison, the bound is adjusted by a tolerance to avoid accidentally cutting off the optimal solution. |
|
Get the cutoff bound on the objective function - always as minimize.
Definition at line 416 of file CbcModel.hpp. |
|
Set the maximum node limit .
Definition at line 424 of file CbcModel.hpp. |
|
Get the maximum node limit .
Definition at line 428 of file CbcModel.hpp. |
|
Set the maximum number of solutions desired.
Definition at line 435 of file CbcModel.hpp. |
|
Get the maximum number of solutions desired.
Definition at line 442 of file CbcModel.hpp. |
|
Set the maximum number of seconds desired.
Definition at line 450 of file CbcModel.hpp. |
|
Get the maximum number of seconds desired.
Definition at line 457 of file CbcModel.hpp. |
|
Current time since start of branchAndbound.
|
|
Set the integrality tolerance .
Definition at line 466 of file CbcModel.hpp. |
|
Get the integrality tolerance .
Definition at line 472 of file CbcModel.hpp. |
|
Set the weight per integer infeasibility .
Definition at line 480 of file CbcModel.hpp. |
|
Get the weight per integer infeasibility .
Definition at line 487 of file CbcModel.hpp. |
|
Set the allowable gap between the best known solution and the best possible solution.
Definition at line 494 of file CbcModel.hpp. |
|
Get the allowable gap between the best known solution and the best possible solution.
Definition at line 500 of file CbcModel.hpp. |
|
Set the fraction allowable gap between the best known solution and the best possible solution.
Definition at line 507 of file CbcModel.hpp. |
|
Get the fraction allowable gap between the best known solution and the best possible solution.
Definition at line 513 of file CbcModel.hpp. |
|
Set the percentage allowable gap between the best known solution and the best possible solution.
Definition at line 519 of file CbcModel.hpp. |
|
Get the percentage allowable gap between the best known solution and the best possible solution.
Definition at line 525 of file CbcModel.hpp. |
|
Definition at line 532 of file CbcModel.hpp. |
|
Definition at line 539 of file CbcModel.hpp. |
|
Pass in target solution and optional priorities. If priorities then >0 means only branch if incorrect while <0 means branch even if correct. +1 or -1 are highest priority |
|
Set the minimum drop to continue cuts.
Definition at line 550 of file CbcModel.hpp. |
|
Get the minimum drop to continue cuts.
Definition at line 553 of file CbcModel.hpp. |
|
Set the maximum number of cut passes at root node (default 20) Minimum drop can also be used for fine tuning.
Definition at line 558 of file CbcModel.hpp. |
|
Get the maximum number of cut passes at root node.
Definition at line 561 of file CbcModel.hpp. |
|
Set the maximum number of cut passes at other nodes (default 10) Minimum drop can also be used for fine tuning.
Definition at line 566 of file CbcModel.hpp. |
|
Get the maximum number of cut passes at other nodes (default 10).
Definition at line 569 of file CbcModel.hpp. |
|
Get current cut pass number in this round of cuts. (1 is first pass) Definition at line 573 of file CbcModel.hpp. |
|
Set the maximum number of candidates to be evaluated for strong branching. A value of 0 disables strong branching. |
|
Get the maximum number of candidates to be evaluated for strong branching.
Definition at line 585 of file CbcModel.hpp. |
|
Set size of mini - tree. If > 1 then does total enumeration of tree given by this best variables to branch on Definition at line 590 of file CbcModel.hpp. |
|
Set an integer parameter.
Definition at line 592 of file CbcModel.hpp. |
|
Set the number of branches before pseudo costs believed in dynamic strong branching. A value of 0 disables dynamic strong branching. |
|
get the number of branches before pseudo costs believed in dynamic strong branching.
Definition at line 603 of file CbcModel.hpp. |
|
Set the number of variables for which to compute penalties in dynamic strong branching. A value of 0 disables penalties. |
|
get the number of variables for which to compute penalties in dynamic strong branching.
Definition at line 613 of file CbcModel.hpp. |
|
Number of analyze iterations to do.
Definition at line 616 of file CbcModel.hpp. |
|
Set an integer parameter.
Definition at line 618 of file CbcModel.hpp. |
|
Get scale factor to make penalties match strong. Should/will be computed Definition at line 622 of file CbcModel.hpp. |
|
Set scale factor to make penalties match strong. Should/will be computed |
|
Problem type as set by user or found by analysis. This will be extended 0 - not known 1 - Set partitioning <= 2 - Set partitioning == 3 - Set covering 4 - all +- 1 or all +1 and odd Definition at line 634 of file CbcModel.hpp. |
|
Set an integer parameter.
Definition at line 636 of file CbcModel.hpp. |
|
Set how often to scan global cuts.
|
|
Get how often to scan global cuts.
Definition at line 642 of file CbcModel.hpp. |
|
Original columns as created by integerPresolve.
Definition at line 645 of file CbcModel.hpp. |
|
Set the print frequency.
Controls the number of nodes evaluated between status prints. If Definition at line 655 of file CbcModel.hpp. |
|
Get the print frequency.
Definition at line 658 of file CbcModel.hpp. |
|
Are there a numerical difficulties?
|
|
Is optimality proven?
|
|
Is infeasiblity proven (or none better than cutoff)?
|
|
Node limit reached?
|
|
Time limit reached?
|
|
Solution limit reached?
|
|
Get how many iterations it took to solve the problem.
Definition at line 678 of file CbcModel.hpp. |
|
Get how many Nodes it took to solve the problem.
Definition at line 681 of file CbcModel.hpp. |
|
Final status of problem Some of these can be found out by is...... functions -1 before branchAndBound 0 finished - check isProvenOptimal or isProvenInfeasible to see if solution found (or check value of best solution) 1 stopped - on maxnodes, maxsols, maxtime 2 difficulties so run was abandoned (5 event user programmed event occurred) Definition at line 692 of file CbcModel.hpp. |
|
Secondary status of problem -1 unset (status_ will also be -1) 0 search completed with solution 1 linear relaxation not feasible (or worse than cutoff) 2 stopped on gap 3 stopped on nodes 4 stopped on time 5 stopped on user event 6 stopped on solutions.
Definition at line 704 of file CbcModel.hpp. |
|
Are there numerical difficulties (for initialSolve) ?
|
|
Is optimality proven (for initialSolve) ?
|
|
Is primal infeasiblity proven (for initialSolve) ?
|
|
Is dual infeasiblity proven (for initialSolve) ?
|
|
Number of rows in continuous (root) problem.
Definition at line 731 of file CbcModel.hpp. |
|
Get number of columns.
Definition at line 735 of file CbcModel.hpp. |
|
Get number of rows.
Definition at line 739 of file CbcModel.hpp. |
|
Get number of nonzero elements.
Definition at line 743 of file CbcModel.hpp. |
|
Number of integers in problem.
Definition at line 747 of file CbcModel.hpp. |
|
Number of rows in continuous (root) problem.
Definition at line 750 of file CbcModel.hpp. |
|
Whether or not integer.
Definition at line 753 of file CbcModel.hpp. |
|
Whether or not integer.
Definition at line 756 of file CbcModel.hpp. |
|
Get pointer to array[getNumCols()] of column lower bounds.
Definition at line 760 of file CbcModel.hpp. |
|
Get pointer to array[getNumCols()] of column upper bounds.
Definition at line 764 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of row constraint senses.
Definition at line 776 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of rows right-hand sides.
Definition at line 787 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of row ranges.
Definition at line 798 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of row lower bounds.
Definition at line 802 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of row upper bounds.
Definition at line 806 of file CbcModel.hpp. |
|
Get pointer to array[getNumCols()] of objective function coefficients.
Definition at line 810 of file CbcModel.hpp. |
|
Get objective function sense (1 for min (default), -1 for max).
Definition at line 814 of file CbcModel.hpp. |
|
Return true if variable is continuous.
Definition at line 820 of file CbcModel.hpp. |
|
Return true if variable is binary.
Definition at line 824 of file CbcModel.hpp. |
|
Return true if column is integer. Note: This function returns true if the the column is binary or a general integer. Definition at line 831 of file CbcModel.hpp. |
|
Return true if variable is general integer.
Definition at line 835 of file CbcModel.hpp. |
|
Return true if variable is binary and not fixed at either bound.
Definition at line 839 of file CbcModel.hpp. |
|
Get pointer to row-wise copy of matrix.
Definition at line 843 of file CbcModel.hpp. |
|
Get pointer to column-wise copy of matrix.
Definition at line 847 of file CbcModel.hpp. |
|
Get solver's value for infinity.
Definition at line 851 of file CbcModel.hpp. |
|
Get pointer to array[getNumCols()] (for speed) of column lower bounds.
Definition at line 854 of file CbcModel.hpp. |
|
Get pointer to array[getNumCols()] (for speed) of column upper bounds.
Definition at line 857 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] (for speed) of row lower bounds.
Definition at line 860 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] (for speed) of row upper bounds.
Definition at line 863 of file CbcModel.hpp. |
|
Get pointer to array[getNumCols()] (for speed) of primal solution vector.
Definition at line 866 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] (for speed) of dual prices.
Definition at line 869 of file CbcModel.hpp. |
|
Get a pointer to array[getNumCols()] (for speed) of reduced costs.
Definition at line 872 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] (for speed) of row activity levels.
Definition at line 875 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts if branchAndBound called).
Definition at line 883 of file CbcModel.hpp. |
|
Array marked whenever a solution is found if non-zero. Code marks if heuristic returns better so heuristic need only mark if it wants to on solutions which are worse than current Definition at line 889 of file CbcModel.hpp. |
|
Increases usedInSolution for nonzeros.
|
|
Record a new incumbent solution and update objectiveValue.
|
|
Just update objectiveValue.
|
|
Call this to really test if a valid solution can be feasible Solution is number columns in size. If fixVariables true then bounds of continuous solver updated. Returns objective value (worse than cutoff if not feasible) Previously computed objective value is now passed in (in case user does not do solve) |
|
Test the current solution for feasiblility.
Scan all objects for indications of infeasibility. This is broken down into simple integer infeasibility ( |
|
Solution to the most recent lp relaxation. The solver's solution to the most recent lp relaxation. Definition at line 922 of file CbcModel.hpp. |
|
For testing infeasibilities - will point to currentSolution_ or solver-->getColSolution().
Definition at line 927 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts if branchAndBound called).
Definition at line 929 of file CbcModel.hpp. |
|
Make sure region there and optionally copy solution.
|
|
Get pointer to array[getNumCols()] of primal solution vector.
Definition at line 935 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of dual prices.
Definition at line 939 of file CbcModel.hpp. |
|
Get a pointer to array[getNumCols()] of reduced costs.
Definition at line 943 of file CbcModel.hpp. |
|
Get pointer to array[getNumRows()] of row activity levels.
Definition at line 947 of file CbcModel.hpp. |
|
Get current objective function value.
Definition at line 951 of file CbcModel.hpp. |
|
Get current minimization objective function value.
Definition at line 954 of file CbcModel.hpp. |
|
Get best objective function value as minimization.
Definition at line 958 of file CbcModel.hpp. |
|
Set best objective function value as minimization.
Definition at line 961 of file CbcModel.hpp. |
|
Get best objective function value.
Definition at line 965 of file CbcModel.hpp. |
|
Get best possible objective function value. This is better of best possible left on tree and best solution found. If called from within branch and cut may be optimistic. |
|
Set best objective function value.
Definition at line 974 of file CbcModel.hpp. |
|
The best solution to the integer programming problem. The best solution to the integer programming problem found during the search. If no solution is found, the method returns null. Definition at line 983 of file CbcModel.hpp. |
|
Get number of solutions.
Definition at line 987 of file CbcModel.hpp. |
|
Set number of solutions (so heuristics will be different).
Definition at line 991 of file CbcModel.hpp. |
|
Current phase (so heuristics etc etc can find out). 0 - initial solve 1 - solve with cuts at root 2 - solve with cuts 3 - other e.g. strong branching 4 - trying to validate a solution 5 - at end of search Definition at line 1001 of file CbcModel.hpp. |
|
Get number of heuristic solutions.
Definition at line 1005 of file CbcModel.hpp. |
|
Set objective function sense (1 for min (default), -1 for max,).
Definition at line 1008 of file CbcModel.hpp. |
|
Value of objective at continuous.
Definition at line 1012 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts if branchAndBound called).
Definition at line 1014 of file CbcModel.hpp. |
|
Number of infeasibilities at continuous.
Definition at line 1017 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts if branchAndBound called).
Definition at line 1019 of file CbcModel.hpp. |
|
Value of objective after root node cuts added.
Definition at line 1022 of file CbcModel.hpp. |
|
Sum of Changes to objective by first solve.
Definition at line 1025 of file CbcModel.hpp. |
|
Number of times global cuts violated. When global cut pool then this should be kept for each cut and type of cut Definition at line 1029 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts if branchAndBound called).
Definition at line 1031 of file CbcModel.hpp. |
|
Whether to force a resolve after takeOffCuts.
Definition at line 1034 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts if branchAndBound called).
Definition at line 1036 of file CbcModel.hpp. |
|
Definition at line 1043 of file CbcModel.hpp. |
|
|
|
|
|
Definition at line 1052 of file CbcModel.hpp. |
|
|
|
|
|
Tree method e.g. heap (which may be overridden by inheritance).
Definition at line 1061 of file CbcModel.hpp. |
|
For modifying tree handling (original is cloned).
|
|
For passing in an CbcModel to do a sub Tree (with derived tree handlers). Passed in model must exist for duration of branch and bound |
|
For retrieving a copy of subtree model with given OsiSolver. If no subtree model will use self (up to user to reset cutoff etc). If solver NULL uses current |
|
Returns number of times any subtree stopped on nodes, time etc.
Definition at line 1075 of file CbcModel.hpp. |
|
Says a sub tree was stopped.
Definition at line 1078 of file CbcModel.hpp. |
|
Whether to automatically do presolve before branch and bound (subTrees). 0 - no 1 - ordinary presolve 2 - integer presolve (dodgy) Definition at line 1085 of file CbcModel.hpp. |
|
Tree method e.g. heap (which may be overridden by inheritance).
Definition at line 1087 of file CbcModel.hpp. |
|
Get the current branching decision method.
Definition at line 1098 of file CbcModel.hpp. |
|
Set the branching decision method.
Definition at line 1101 of file CbcModel.hpp. |
|
Set the branching method. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 1107 of file CbcModel.hpp. |
|
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no solution but many nodes.
Definition at line 1120 of file CbcModel.hpp. |
|
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no solution but many nodes.
Definition at line 1122 of file CbcModel.hpp. |
|
Strategy worked out - mainly at root node for use by CbcNode.
Definition at line 1125 of file CbcModel.hpp. |
|
Set strategy worked out - mainly at root node for use by CbcNode.
Definition at line 1128 of file CbcModel.hpp. |
|
Get the number of cut generators.
Definition at line 1132 of file CbcModel.hpp. |
|
Get the list of cut generators.
Definition at line 1135 of file CbcModel.hpp. |
|
Get the specified cut generator.
Definition at line 1138 of file CbcModel.hpp. |
|
Get the specified cut generator before any changes.
Definition at line 1141 of file CbcModel.hpp. |
|
Add one generator - up to user to delete generators. howoften affects how generator is used. 0 or 1 means always, >1 means every that number of nodes. Negative values have same meaning as positive but they may be switched off (-> -100) by code if not many cuts generated at continuous. -99 is just done at root. Name is just for printout. If depth >0 overrides how often generator is called (if howOften==-1 or >0). |
|
Get the current strategy.
Definition at line 1164 of file CbcModel.hpp. |
|
Set the strategy. Clones.
|
|
Get the current parent model.
Definition at line 1169 of file CbcModel.hpp. |
|
Set the parent model.
Definition at line 1172 of file CbcModel.hpp. |
|
Add one heuristic - up to user to delete.
|
|
Get the specified heuristic.
Definition at line 1182 of file CbcModel.hpp. |
|
Get the number of heuristics.
Definition at line 1185 of file CbcModel.hpp. |
|
Pointer to heuristic solver which found last solution (or NULL).
Definition at line 1188 of file CbcModel.hpp. |
|
set last heuristic which found a solution
Definition at line 1191 of file CbcModel.hpp. |
|
Pass in branching priorities. If ifClique then priorities are on cliques otherwise priorities are on integer variables. Other type (if exists set to default) 1 is highest priority. (well actually -INT_MAX is but that's ugly) If hotstart > 0 then branches are created to force the variable to the value given by best solution. This enables a sort of hot start. The node choice should be greatest depth and hotstart should normally be switched off after a solution. If ifNotSimpleIntegers true then appended to normal integers This is now deprecated except for simple usage. If user creates Cbcobjects then set priority in them |
|
Returns priority level for an object (or 1000 if no priorities exist).
Definition at line 1215 of file CbcModel.hpp. |
|
Set an event handler. A clone of the handler passed as a parameter is stored in CbcModel. |
|
Retrieve a pointer to the event handler.
Definition at line 1225 of file CbcModel.hpp. |
|
Set application data. This is a pointer that the application can store into and retrieve from the solver interface. This field is available for the application to optionally define and use. |
|
Get application data.
|
|
For advanced applications you may wish to modify the behavior of Cbc e.g. if the solver is a NLP solver then you may not have an exact optimum solution at each step. Information could be built into OsiSolverInterface but this is an alternative so that that interface does not have to be changed. If something similar is useful to enough solvers then it could be migrated |
|
Pass in Message handler (not deleted at end).
|
|
Set language.
|
|
Pass in Message handler (not deleted at end).
Definition at line 1262 of file CbcModel.hpp. |
|
Return handler.
Definition at line 1265 of file CbcModel.hpp. |
|
Return messages.
Definition at line 1268 of file CbcModel.hpp. |
|
Return pointer to messages.
Definition at line 1271 of file CbcModel.hpp. |
|
Set log level.
|
|
Get log level.
Definition at line 1276 of file CbcModel.hpp. |
|
Set special options.
Definition at line 1293 of file CbcModel.hpp. |
|
Get special options.
Definition at line 1296 of file CbcModel.hpp. |
|
Assign a solver to the model (model assumes ownership).
On return,
|
|
Assignment operator.
|
|
Returns solver - has current state.
Definition at line 1331 of file CbcModel.hpp. |
|
Returns solver with continuous state.
Definition at line 1335 of file CbcModel.hpp. |
|
A copy of the solver, taken at constructor or by saveReferenceSolver.
Definition at line 1339 of file CbcModel.hpp. |
|
Save a copy of the current solver so can be reset to.
|
|
Uses a copy of reference solver to be current solver. Because of possible mismatches all exotic integer information is loat (apart from normal information in OsiSolverInterface) so SOS etc and priorities will have to be redone |
|
Clears out as much as possible (except solver).
|
|
Clears out enough to reset CbcModel as if no branch and bound done.
|
|
Get how many Nodes it took to solve the problem.
Definition at line 1362 of file CbcModel.hpp. |
|
Set pointers for speed.
|
|
Perform reduced cost fixing. Fixes integer variables at their current value based on reduced cost penalties. Returns number fixed |
|
Return an empty basis object of the specified size. A useful utility when constructing a basis for a subproblem from scratch. The object returned will be of the requested capacity and appropriate for the solver attached to the model. |
|
Remove inactive cuts from the model. An OsiSolverInterface is expected to maintain a valid basis, but not a valid solution, when loose cuts are deleted. Restoring a valid solution requires calling the solver to reoptimise. If it's certain the solution will not be required, set allowResolve to false to suppress reoptimisation. If saveCuts then slack cuts will be saved |
|
Determine and install the active cuts that need to be added for the current subproblem. The whole truth is a bit more complicated. The first action is a call to addCuts1(). addCuts() then sorts through the list, installs the tight cuts in the model, and does bookkeeping (adjusts reference counts). The basis returned from addCuts1() is adjusted accordingly. If it turns out that the node should really be fathomed by bound, addCuts() simply treats all the cuts as loose as it does the bookkeeping. canFix true if extra information being passed |
|
Traverse the tree from node to root and prep the model. addCuts1() begins the job of prepping the model to match the current subproblem. The model is stripped of all cuts, and the search tree is traversed from node to root to determine the changes required. Appropriate bounds changes are installed, a list of cuts is collected but not installed, and an appropriate basis (minus the cuts, but big enough to accommodate them) is constructed.
|
|
Set objective value in a node. This is separated out so that odd solvers can use. It may look at extra information in solverCharacteriscs_ and will also use bound from parent node |
|
If numberBeforeTrust >0 then we are going to use CbcBranchDynamic. Scan and convert CbcSimpleInteger objects |
|
Use cliques for pseudocost information - return nonzero if infeasible.
|
|
Fill in useful estimates.
|
|
Get the hotstart solution.
Definition at line 1439 of file CbcModel.hpp. |
|
Get the hotstart priorities.
Definition at line 1442 of file CbcModel.hpp. |
|
Return the list of cuts initially collected for this subproblem.
Definition at line 1446 of file CbcModel.hpp. |
|
Number of entries in the list returned by addedCuts().
Definition at line 1449 of file CbcModel.hpp. |
|
Global cuts.
Definition at line 1452 of file CbcModel.hpp. |
|
Copy and set a pointer to a row cut which will be added instead of normal branching.
|
|
Get a pointer to current node (be careful).
Definition at line 1457 of file CbcModel.hpp. |
|
Set the number of iterations done in strong branching.
Definition at line 1460 of file CbcModel.hpp. |
|
Get the number of iterations done in strong branching.
Definition at line 1463 of file CbcModel.hpp. |
|
Increment strong info.
|
|
Create C++ lines to get to current state.
|
|
The solver associated with this model.
Definition at line 1479 of file CbcModel.hpp. |
|
Ownership of the solver object. The convention is that CbcModel owns the null solver. Currently there is no public method to give CbcModel a solver without giving ownership, but the hook is here. Definition at line 1487 of file CbcModel.hpp. |
|
A copy of the solver, taken at the continuous (root) node.
Definition at line 1490 of file CbcModel.hpp. |
|
A copy of the solver, taken at constructor or by saveReferenceSolver.
Definition at line 1493 of file CbcModel.hpp. |
|
Message handler.
Definition at line 1496 of file CbcModel.hpp. |
|
Flag to say if handler_ is the default handler. The default handler is deleted when the model is deleted. Other handlers (supplied by the client) will not be deleted. Definition at line 1503 of file CbcModel.hpp. |
|
Cbc messages.
Definition at line 1506 of file CbcModel.hpp. |
|
Array for integer parameters.
Definition at line 1509 of file CbcModel.hpp. |
|
Array for double parameters.
Definition at line 1512 of file CbcModel.hpp. |
|
Pointer to an empty warm start object. It turns out to be useful to have this available as a base from which to build custom warm start objects. This is typed as CoinWarmStart rather than CoinWarmStartBasis to allow for the possibility that a client might want to apply a solver that doesn't use a basis-based warm start. See getEmptyBasis for an example of how this field can be used. Definition at line 1522 of file CbcModel.hpp. |
|
Best objective.
Definition at line 1525 of file CbcModel.hpp. |
|
Best possible objective.
Definition at line 1527 of file CbcModel.hpp. |
|
Sum of Changes to objective by first solve.
Definition at line 1529 of file CbcModel.hpp. |
|
Sum of Changes to objective by subsequent solves.
Definition at line 1531 of file CbcModel.hpp. |
|
Array holding the incumbent (best) solution.
Definition at line 1534 of file CbcModel.hpp. |
|
Array holding the current solution. This array is used more as a temporary. Definition at line 1540 of file CbcModel.hpp. |
|
For testing infeasibilities - will point to currentSolution_ or solver-->getColSolution().
Definition at line 1544 of file CbcModel.hpp. |
|
Global cuts.
Definition at line 1546 of file CbcModel.hpp. |
|
Minimum degradation in objective value to continue cut generation.
Definition at line 1549 of file CbcModel.hpp. |
|
Number of solutions.
Definition at line 1551 of file CbcModel.hpp. |
|
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no solution but many nodes.
Definition at line 1558 of file CbcModel.hpp. |
|
Hotstart solution.
Definition at line 1560 of file CbcModel.hpp. |
|
Hotstart priorities.
Definition at line 1562 of file CbcModel.hpp. |
|
Number of heuristic solutions.
Definition at line 1564 of file CbcModel.hpp. |
|
Cumulative number of nodes.
Definition at line 1566 of file CbcModel.hpp. |
|
Cumulative number of nodes for statistics. Must fix to match up Definition at line 1570 of file CbcModel.hpp. |
|
Cumulative number of iterations.
Definition at line 1572 of file CbcModel.hpp. |
|
Status of problem - 0 finished, 1 stopped, 2 difficulties.
Definition at line 1574 of file CbcModel.hpp. |
|
Secondary status of problem -1 unset (status_ will also be -1) 0 search completed with solution 1 linear relaxation not feasible (or worse than cutoff) 2 stopped on gap 3 stopped on nodes 4 stopped on time 5 stopped on user event 6 stopped on solutions.
Definition at line 1585 of file CbcModel.hpp. |
|
Number of integers in problem.
Definition at line 1587 of file CbcModel.hpp. |
|
Number of rows at continuous.
Definition at line 1589 of file CbcModel.hpp. |
|
Maximum number of cuts.
Definition at line 1591 of file CbcModel.hpp. |
|
Current phase (so heuristics etc etc can find out). 0 - initial solve 1 - solve with cuts at root 2 - solve with cuts 3 - other e.g. strong branching 4 - trying to validate a solution 5 - at end of search Definition at line 1600 of file CbcModel.hpp. |
|
Number of entries in addedCuts_.
Definition at line 1603 of file CbcModel.hpp. |
|
Current limit on search tree depth. The allocated size of walkback_. Increased as needed. Definition at line 1609 of file CbcModel.hpp. |
|
Array used to assemble the path between a node and the search tree root. The array is resized when necessary. maximumDepth_ is the current allocated size. Definition at line 1615 of file CbcModel.hpp. |
|
The list of cuts initially collected for this subproblem. When the subproblem at this node is rebuilt, a set of cuts is collected for inclusion in the constraint system. If any of these cuts are subsequently removed because they have become loose, the corresponding entry is set to NULL. Definition at line 1624 of file CbcModel.hpp. |
|
A pointer to a row cut which will be added instead of normal branching. After use it should be set to NULL. Definition at line 1629 of file CbcModel.hpp. |
|
Current node so can be used elsewhere.
Definition at line 1632 of file CbcModel.hpp. |
|
Indices of integer variables.
Definition at line 1635 of file CbcModel.hpp. |
|
Whether of not integer.
Definition at line 1637 of file CbcModel.hpp. |
|
Holds solution at continuous (after cuts).
Definition at line 1639 of file CbcModel.hpp. |
|
Array marked whenever a solution is found if non-zero.
Definition at line 1641 of file CbcModel.hpp. |
|
0 bit (1) - check if cuts valid (if on debugger list) 1 bit (2) - use current basis to check integer solution (rather than all slack) 2 bit (4) - don't check integer solution 3 bit (8) - Strong is doing well - keep on
Definition at line 1648 of file CbcModel.hpp. |
|
User node comparison function.
Definition at line 1650 of file CbcModel.hpp. |
|
User feasibility function (see CbcFeasibleBase.hpp).
Definition at line 1652 of file CbcModel.hpp. |
|
Tree.
Definition at line 1654 of file CbcModel.hpp. |
|
A pointer to model to be used for subtrees.
Definition at line 1656 of file CbcModel.hpp. |
|
Number of times any subtree stopped on nodes, time etc.
Definition at line 1658 of file CbcModel.hpp. |
|
Variable selection function.
Definition at line 1660 of file CbcModel.hpp. |
|
Strategy.
Definition at line 1662 of file CbcModel.hpp. |
|
Parent model.
Definition at line 1664 of file CbcModel.hpp. |
|
Pointer to array[getNumCols()] (for speed) of column lower bounds. 0 - no 1 - ordinary presolve 2 - integer presolve (dodgy) Definition at line 1671 of file CbcModel.hpp. |
|
Pointer to array[getNumCols()] (for speed) of column upper bounds.
Definition at line 1673 of file CbcModel.hpp. |
|
Pointer to array[getNumRows()] (for speed) of row lower bounds.
Definition at line 1675 of file CbcModel.hpp. |
|
Pointer to array[getNumRows()] (for speed) of row upper bounds.
Definition at line 1677 of file CbcModel.hpp. |
|
Pointer to array[getNumCols()] (for speed) of primal solution vector.
Definition at line 1679 of file CbcModel.hpp. |
|
Pointer to array[getNumRows()] (for speed) of dual prices.
Definition at line 1681 of file CbcModel.hpp. |
|
Get a pointer to array[getNumCols()] (for speed) of reduced costs.
Definition at line 1683 of file CbcModel.hpp. |
|
Pointer to array[getNumRows()] (for speed) of row activity levels.
Definition at line 1685 of file CbcModel.hpp. |
|
Pointer to user-defined data structure.
Definition at line 1687 of file CbcModel.hpp. |
|
Pointer to.
Definition at line 1689 of file CbcModel.hpp. |
|
Maximum number of candidates to consider for strong branching. To disable strong branching, set this to 0. Definition at line 1693 of file CbcModel.hpp. |
|
The number of branches before pseudo costs believed in dynamic strong branching. (0 off) Definition at line 1696 of file CbcModel.hpp. |
|
The number of variable sfor which to compute penalties in dynamic strong branching. (0 off) Definition at line 1699 of file CbcModel.hpp. |
|
Scale factor to make penalties match strong. Should/will be computed Definition at line 1702 of file CbcModel.hpp. |
|
Number of analyze iterations to do.
Definition at line 1704 of file CbcModel.hpp. |
|
Arrays with analysis results.
Definition at line 1706 of file CbcModel.hpp. |
|
Number of nodes infeasible by normal branching (before cuts).
Definition at line 1708 of file CbcModel.hpp. |
|
Problem type as set by user or found by analysis. This will be extended 0 - not known 1 - Set partitioning <= 2 - Set partitioning == 3 - Set covering Definition at line 1715 of file CbcModel.hpp. |
|
Print frequency.
Definition at line 1717 of file CbcModel.hpp. |
|
Number of cut generators.
Definition at line 1719 of file CbcModel.hpp. |
|
The solver associated with this model.
Definition at line 1721 of file CbcModel.hpp. |
|
The solver associated with this model.
Definition at line 1723 of file CbcModel.hpp. |
|
Number of heuristics.
Definition at line 1725 of file CbcModel.hpp. |
|
Heuristic solvers.
Definition at line 1727 of file CbcModel.hpp. |
|
Pointer to heuristic solver which found last solution (or NULL).
Definition at line 1729 of file CbcModel.hpp. |
|
Pointer to the event handler Definition at line 1734 of file CbcModel.hpp. |
|
Total number of objects.
Definition at line 1738 of file CbcModel.hpp. |
|
Integer and Clique and ... information.
Definition at line 1750 of file CbcModel.hpp. |
|
Original columns as created by integerPresolve.
Definition at line 1754 of file CbcModel.hpp. |
|
How often to scan global cuts.
Definition at line 1756 of file CbcModel.hpp. |
|
Number of times global cuts violated. When global cut pool then this should be kept for each cut and type of cut Definition at line 1759 of file CbcModel.hpp. |
|
Value of objective at continuous (Well actually after initial round of cuts).
Definition at line 1763 of file CbcModel.hpp. |
|
Value of objective before root node cuts added.
Definition at line 1766 of file CbcModel.hpp. |
|
Number of infeasibilities at continuous.
Definition at line 1768 of file CbcModel.hpp. |
|
Maximum number of cut passes at root.
Definition at line 1770 of file CbcModel.hpp. |
|
Maximum number of cut passes.
Definition at line 1772 of file CbcModel.hpp. |
|
Current cut pass number.
Definition at line 1774 of file CbcModel.hpp. |
|
Maximum number of cuts (for whichGenerator_).
Definition at line 1776 of file CbcModel.hpp. |
|
Which cut generator generated this cut.
Definition at line 1778 of file CbcModel.hpp. |
|
Maximum number of statistics.
Definition at line 1780 of file CbcModel.hpp. |
|
statistics
Definition at line 1782 of file CbcModel.hpp. |
|
Number of fixed by analyze at root.
Definition at line 1784 of file CbcModel.hpp. |
|
Number fixed by analyze so far.
Definition at line 1786 of file CbcModel.hpp. |
|
Whether stopping on gap.
Definition at line 1788 of file CbcModel.hpp. |
|
Whether event happened.
Definition at line 1790 of file CbcModel.hpp. |
|
Number of long strong goes.
Definition at line 1792 of file CbcModel.hpp. |
|
Number of old active cuts.
Definition at line 1794 of file CbcModel.hpp. |
|
Number of new cuts.
Definition at line 1796 of file CbcModel.hpp. |
|
Size of mini - tree.
Definition at line 1798 of file CbcModel.hpp. |
|
Strategy worked out - mainly at root node.
Definition at line 1800 of file CbcModel.hpp. |
|
Number of iterations in strong branching.
Definition at line 1802 of file CbcModel.hpp. |
|
0 - number times strong branching done, 1 - number fixed, 2 - number infeasible
Definition at line 1804 of file CbcModel.hpp. |
|
For advanced applications you may wish to modify the behavior of Cbc e.g. if the solver is a NLP solver then you may not have an exact optimum solution at each step. This gives characteristics - just for one BAB. For actually saving/restoring a solution you need the actual solver one. Definition at line 1811 of file CbcModel.hpp. |
|
Whether to force a resolve after takeOffCuts.
Definition at line 1813 of file CbcModel.hpp. |