Model class for ALPS Branch and Cut. More...
#include <AbcModel.h>
Public Types | |
enum | AbcIntParam { AbcMaxNumNode =0, AbcMaxNumSol, AbcFathomDiscipline, AbcLastIntParam } |
enum | AbcDblParam { AbcIntegerTolerance = 0, AbcInfeasibilityWeight, AbcCutoffIncrement, AbcAllowableGap, AbcMaximumSeconds, AbcLastDblParam } |
Public Member Functions | |
AbcModel () | |
AbcModel (const OsiSolverInterface &rhs) | |
~AbcModel () | |
void | init () |
Initialize member data. More... | |
virtual void | readInstance (const char *dataFile) |
Read in the problem data. More... | |
void | readParameters (const int argnum, const char *const *arglist) |
Read in Alps and Abc parameters. More... | |
AbcParams * | AbcPar () |
OsiSolverInterface * | solver () const |
Returns solver - has current state. More... | |
void | assignSolver (OsiSolverInterface *&solver) |
Assign a solver to the model (model assumes ownership) On return, solver will be NULL. More... | |
CoinWarmStartBasis * | getEmptyBasis (int ns=0, int na=0) const |
Return an empty basis object of the specified size A useful utility when constructing a basis for a subproblem from scratch. More... | |
int | numberIntegers () const |
Number of integers in problem. More... | |
const int * | integerVariable () const |
Integer variables. More... | |
bool | checkInteger (double value) const |
void | findIntegers (bool startAgain) |
Identify integer variables and create corresponding objects. More... | |
void | addCutGenerator (CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false) |
Add one generator - up to user to delete generators. More... | |
void | reducedCostFix () |
Perform reduced cost fixing Fixes integer variables at their current value based on reduced cost penalties. More... | |
void | takeOffCuts () |
Remove inactive cuts from the model. More... | |
bool | setIntParam (AbcIntParam key, int value) |
Set an integer parameter. More... | |
bool | setDblParam (AbcDblParam key, double value) |
Set a double parameter. More... | |
int | getIntParam (AbcIntParam key) const |
Get an integer parameter. More... | |
double | getDblParam (AbcDblParam key) const |
Get a double parameter. More... | |
void | setCutoff (double value) |
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. More... | |
double | getCutoff () const |
Get the cutoff bound on the objective function - always as minimize. More... | |
bool | setMaximumNodes (int value) |
Set the maximum node limit . More... | |
int | getMaximumNodes () const |
Get the maximum node limit . More... | |
bool | setMaximumSolutions (int value) |
Set the maximum number of solutions desired. More... | |
int | getMaximumSolutions () const |
Get the maximum number of solutions desired. More... | |
bool | setIntegerTolerance (double value) |
Set the integrality tolerance . More... | |
double | getIntegerTolerance () const |
Get the integrality tolerance . More... | |
bool | setInfeasibilityWeight (double value) |
Set the weight per integer infeasibility . More... | |
double | getInfeasibilityWeight () const |
Get the weight per integer infeasibility . More... | |
bool | setAllowableGap (double value) |
Set the allowable gap between the best known solution and the best possible solution. More... | |
double | getAllowableGap () const |
Get the allowable gap between the best known solution and the best possible solution. More... | |
void | setMinimumDrop (double value) |
Set the minimum drop to continue cuts. More... | |
double | getMinimumDrop () const |
Get the minimum drop to continue cuts. More... | |
virtual bool | setupSelf () |
Do necessary work to make model usable. More... | |
int | numberStrong () const |
void | setNumberStrong (int number) |
const int * | priority () const |
Priorities. More... | |
int | priority (int sequence) const |
Returns priority level for an object (or 1000 if no priorities exist) More... | |
virtual AlpsEncoded * | encode () const |
The method that encodes the model into a encoded object. More... | |
virtual void | decodeToSelf (AlpsEncoded &) |
The method that decodes the model from a encoded object. More... | |
Solve methods | |
void | initialSolve () |
Solve the initial LP relaxation Invoke the solver's initialSolve() method. More... | |
bool | solveWithCuts (OsiCuts &cuts, int numberTries, AbcTreeNode *node, int &numberOldActiveCuts, int &numberNewCuts, int &maximumWhich, int *&whichGenerator, const bool cutDuringRampup, int &found) |
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. More... | |
bool | resolve () |
Reoptimise an LP relaxation Invoke the solver's resolve() method. More... | |
Methods returning info on how the solution process terminated | |
bool | isAbandoned () const |
Are there a numerical difficulties? More... | |
bool | isProvenOptimal () const |
Is optimality proven? More... | |
bool | isProvenInfeasible () const |
Is infeasiblity proven (or none better than cutoff)? More... | |
bool | isNodeLimitReached () const |
Node limit reached? More... | |
bool | isSolutionLimitReached () const |
Solution limit reached? More... | |
int | getIterationCount () const |
Get how many iterations it took to solve the problem. More... | |
int | getNodeCount () const |
Get how many Nodes it took to solve the problem. More... | |
void | incrementNodeCount (int s=1) |
Increment the count of nodes. More... | |
int | status () const |
Final status of problem 0 finished, 1 stopped, 2 difficulties. More... | |
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. More... | |
void | setNumberRowsAtContinous (const int value) |
Number of rows in continuous (root) problem. More... | |
int | getNumCols () const |
Get number of columns. More... | |
int | getNumRows () const |
Get number of rows. More... | |
int | getNumElements () const |
Get number of nonzero elements. More... | |
const double * | getColLower () const |
Get pointer to array[getNumCols()] of column lower bounds. More... | |
const double * | getColUpper () const |
Get pointer to array[getNumCols()] of column upper bounds. More... | |
const char * | getRowSense () const |
Get pointer to array[getNumRows()] of row constraint senses. More... | |
const double * | getRightHandSide () const |
Get pointer to array[getNumRows()] of rows right-hand sides. More... | |
const double * | getRowRange () const |
Get pointer to array[getNumRows()] of row ranges. More... | |
const double * | getRowLower () const |
Get pointer to array[getNumRows()] of row lower bounds. More... | |
const double * | getRowUpper () const |
Get pointer to array[getNumRows()] of row upper bounds. More... | |
const double * | getObjCoefficients () const |
Get pointer to array[getNumCols()] of objective function coefficients. More... | |
double | getObjSense () const |
Get objective function sense (1 for min (default), -1 for max) More... | |
AbcPseudocost ** | getPseudoList () |
Number of rows in continuous (root) problem. More... | |
int * | getPseudoIndices () |
Number of rows in continuous (root) problem. More... | |
bool | isContinuous (int colIndex) const |
Return true if variable is continuous. More... | |
bool | isBinary (int colIndex) const |
Return true if variable is binary. More... | |
bool | isInteger (int colIndex) const |
Return true if column is integer. More... | |
bool | isIntegerNonBinary (int colIndex) const |
Return true if variable is general integer. More... | |
bool | isFreeBinary (int colIndex) const |
Return true if variable is binary and not fixed at either bound. More... | |
const CoinPackedMatrix * | getMatrixByRow () const |
Get pointer to row-wise copy of matrix. More... | |
const CoinPackedMatrix * | getMatrixByCol () const |
Get pointer to column-wise copy of matrix. More... | |
double | getInfinity () const |
Get solver's value for infinity. More... | |
Methods related to querying the solution | |
double | checkSolution (double cutoff, const double *solution, bool fixVariables) |
Call this to really test if a valid solution can be feasible Solution is number columns in size. More... | |
bool | setBestSolution (ABC_Message how, double &objectiveValue, const double *solution, bool fixVariables=false) |
Record a new incumbent solution and update objectiveValue. More... | |
bool | feasibleSolution (int &numberIntegerInfeasibilities) |
Test the current solution for feasiblility. More... | |
double * | currentSolution () const |
Solution to the most recent lp relaxation. More... | |
const double * | getColSolution () const |
Get pointer to array[getNumCols()] of primal solution vector. More... | |
const double * | getRowPrice () const |
Get pointer to array[getNumRows()] of dual prices. More... | |
const double * | getReducedCost () const |
Get a pointer to array[getNumCols()] of reduced costs. More... | |
const double * | getRowActivity () const |
Get pointer to array[getNumRows()] of row activity levels. More... | |
double | getCurrentObjValue () const |
Get current objective function value. More... | |
double | getObjValue () const |
Get best objective function value. More... | |
void | setObjValue (double obj) |
Set the best objective value. More... | |
const double * | bestSolution () const |
The best solution to the integer programming problem. More... | |
int | getSolutionCount () const |
Get number of solutions. More... | |
void | setSolutionCount (int value) |
Set number of solutions (so heuristics will be different) More... | |
int | getNumberHeuristicSolutions () const |
Get number of heuristic solutions. More... | |
void | setObjSense (double s) |
Set objective function sense (1 for min (default), -1 for max,) More... | |
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. More... | |
int | getMaximumCutPassesAtRoot () const |
Get the maximum number of cut passes at root node. More... | |
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. More... | |
int | getMaximumCutPasses () const |
Get the maximum number of cut passes at other nodes (default 10) More... | |
int | currentNumberCuts () const |
Number of entries in the list returned by #addedCuts() More... | |
void | setCurrentNumberCuts (int value) |
Call this to really test if a valid solution can be feasible Solution is number columns in size. More... | |
Branching Decisions | |
See the AbcBranchDecision class for additional information. | |
AbcBranchDecision * | branchingMethod () const |
Get the current branching decision method. More... | |
void | setBranchingMethod (AbcBranchDecision *method) |
Set the branching decision method. More... | |
void | setBranchingMethod (AbcBranchDecision &method) |
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. More... | |
Message handling | |
void | passInMessageHandler (CoinMessageHandler *handler) |
Pass in Message handler (not deleted at end) More... | |
void | newLanguage (CoinMessages::Language language) |
Set language. More... | |
void | setLanguage (CoinMessages::Language language) |
Pass in Message handler (not deleted at end) More... | |
CoinMessageHandler * | messageHandler () const |
Return handler. More... | |
CoinMessages | messages () |
Return messages. More... | |
CoinMessages * | messagesPointer () |
Return pointer to messages. More... | |
Heuristics and priorities | |
void | addHeuristic (AbcHeuristic *generator) |
Add one heuristic. More... | |
![]() | |
AlpsModel () | |
Default construtor. More... | |
virtual | ~AlpsModel () |
Destructor. More... | |
AlpsKnowledgeBroker * | getKnowledgeBroker () |
Get knowledge broker. More... | |
void | setKnowledgeBroker (AlpsKnowledgeBroker *b) |
Set knowledge broker. More... | |
std::string | getDataFile () const |
Get the input file. More... | |
void | setDataFile (std::string infile) |
Set the data file. More... | |
AlpsParams * | AlpsPar () |
Access Alps Parameters. More... | |
void | writeParameters (std::ostream &outstream) const |
Write out parameters. More... | |
virtual void | preprocess () |
Preprocessing the model. More... | |
virtual void | postprocess () |
Postprocessing results. More... | |
virtual AlpsTreeNode * | createRoot () |
Create the root node. More... | |
virtual void | modelLog () |
Problem specific log. More... | |
virtual void | nodeLog (AlpsTreeNode *node, bool force) |
Node log. More... | |
virtual bool | fathomAllNodes () |
Return true if all nodes on this process can be fathomed. More... | |
AlpsReturnStatus | encodeAlps (AlpsEncoded *encoded) const |
Pack Alps portion of node into an encoded object. More... | |
AlpsReturnStatus | decodeAlps (AlpsEncoded &encoded) |
Unpack Alps portion of node from an encoded object. More... | |
virtual void | registerKnowledge () |
Register knowledge class. More... | |
virtual void | sendGeneratedKnowledge () |
Send generated knowledge. More... | |
virtual void | receiveGeneratedKnowledge () |
Receive generated knowledge. More... | |
virtual AlpsEncoded * | packSharedKnowlege () |
Pack knowledge to be shared with others into an encoded object. More... | |
virtual void | unpackSharedKnowledge (AlpsEncoded &) |
Unpack and store shared knowledge from an encoded object. More... | |
![]() | |
AlpsKnowledge () | |
virtual | ~AlpsKnowledge () |
KnowledgeType | getType () |
void | setType (KnowledgeType t) |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) |
Pack into a encode object. More... | |
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const |
This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. More... | |
AlpsEncoded * | getEncoded () const |
Get/set encoded. More... | |
void | setEncoded (AlpsEncoded *e) |
Private Attributes | |
CoinMessageHandler * | handler_ |
Message handler. More... | |
bool | defaultHandler_ |
Flag to say if handler_ is the default handler. More... | |
CoinMessages | messages_ |
Abc messages. More... | |
int | intParam_ [AbcLastIntParam] |
Array for integer parameters. More... | |
double | dblParam_ [AbcLastDblParam] |
Array for double parameters. More... | |
OsiSolverInterface * | solver_ |
The solver associated with this model. More... | |
bool | ourSolver_ |
Ownership of the solver object The convention is that AbcModel owns the null solver. More... | |
OsiSolverInterface * | continuousSolver_ |
A copy of the solver, taken at the continuous (root) node. More... | |
CoinWarmStartBasis * | basis_ |
Pointer to a warm start basis. More... | |
CoinWarmStartBasis * | lastws_ |
Pointer to last warm basis. More... | |
double | minimumDrop_ |
Minimum degradation in objective value to continue cut generation. More... | |
double | bestObjective_ |
Best objective. More... | |
double * | bestSolution_ |
Array holding the incumbent (best) solution. More... | |
double * | currentSolution_ |
Array holding the current solution. More... | |
OsiCuts | globalCuts_ |
Global cuts. More... | |
int | numberNodes_ |
Cumulative number of nodes. More... | |
int | numberIterations_ |
Cumulative number of iterations. More... | |
int | status_ |
Status of problem - 0 finished, 1 stopped, 2 difficulties. More... | |
int | currentNumberCuts_ |
Number of entries in #addedCuts_. More... | |
int | maximumNumberCuts_ |
Maximum number of cuts. More... | |
int | howOftenGlobalScan_ |
How often to scan global cuts. More... | |
int | maximumDepth_ |
Current limit on search tree depth. More... | |
int | numberStrong_ |
Maximum number of candidates to consider for strong branching. More... | |
int | numberCutGenerators_ |
Number of cut generators. More... | |
AbcCutGenerator ** | generator_ |
int | numberHeuristics_ |
Number of heuristics. More... | |
AbcHeuristic ** | heuristic_ |
int | maximumCutPassesAtRoot_ |
Maximum number of cut passes at root. More... | |
int | maximumCutPasses_ |
Maximum number of cut passes. More... | |
AbcBranchDecision * | branchingMethod_ |
Variable selection function. More... | |
int | numberSolutions_ |
Number of solutions. More... | |
int | numberHeuristicSolutions_ |
Number of heuristic solutions. More... | |
int * | priority_ |
Priorities. More... | |
AbcPseudocost ** | pseudoList_ |
int * | pseudoIndices_ |
AbcParams * | AbcPar_ |
Abc parameters. More... | |
Shared problem data | |
int | numberRowsAtContinuous_ |
Number of rows at continuous. More... | |
int | numberIntegers_ |
Number of integers in problem. More... | |
int * | integerVariable_ |
Indices of integer variables. More... | |
CoinWarmStartBasis * | sharedBasis_ |
Pointer to a warm start basis. More... | |
Additional Inherited Members | |
![]() | |
AlpsKnowledgeBroker * | broker_ |
Knowledge broker. More... | |
std::string | dataFile_ |
Data file. More... | |
AlpsParams * | AlpsPar_ |
The parameter set that is used in Alps. More... | |
![]() | |
KnowledgeType | type_ |
Model class for ALPS Branch and Cut.
Definition at line 55 of file AbcModel.h.
Definition at line 58 of file AbcModel.h.
Definition at line 75 of file AbcModel.h.
|
inline |
Definition at line 222 of file AbcModel.h.
|
inline |
Definition at line 227 of file AbcModel.h.
|
inline |
Definition at line 258 of file AbcModel.h.
|
inline |
Initialize member data.
Definition at line 329 of file AbcModel.h.
|
inlinevirtual |
|
inlinevirtual |
Read in Alps and Abc parameters.
Reimplemented from AlpsModel.
Definition at line 388 of file AbcModel.h.
|
inline |
Definition at line 395 of file AbcModel.h.
|
inline |
Returns solver - has current state.
Definition at line 398 of file AbcModel.h.
void AbcModel::assignSolver | ( | OsiSolverInterface *& | solver | ) |
Assign a solver to the model (model assumes ownership) On return, solver
will be NULL.
CoinWarmStartBasis* AbcModel::getEmptyBasis | ( | int | ns = 0 , |
int | na = 0 |
||
) | const |
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.
|
inline |
Number of integers in problem.
Definition at line 414 of file AbcModel.h.
|
inline |
Integer variables.
Definition at line 418 of file AbcModel.h.
void AbcModel::initialSolve | ( | ) |
Solve the initial LP relaxation Invoke the solver's initialSolve() method.
bool AbcModel::solveWithCuts | ( | OsiCuts & | cuts, |
int | numberTries, | ||
AbcTreeNode * | node, | ||
int & | numberOldActiveCuts, | ||
int & | numberNewCuts, | ||
int & | maximumWhich, | ||
int *& | whichGenerator, | ||
const bool | cutDuringRampup, | ||
int & | found | ||
) |
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.
bool AbcModel::resolve | ( | ) |
Reoptimise an LP relaxation Invoke the solver's resolve() method.
bool AbcModel::isAbandoned | ( | ) | const |
Are there a numerical difficulties?
bool AbcModel::isProvenOptimal | ( | ) | const |
Is optimality proven?
bool AbcModel::isProvenInfeasible | ( | ) | const |
Is infeasiblity proven (or none better than cutoff)?
bool AbcModel::isNodeLimitReached | ( | ) | const |
Node limit reached?
bool AbcModel::isSolutionLimitReached | ( | ) | const |
Solution limit reached?
|
inline |
Get how many iterations it took to solve the problem.
Definition at line 461 of file AbcModel.h.
|
inline |
Get how many Nodes it took to solve the problem.
Definition at line 464 of file AbcModel.h.
|
inline |
Increment the count of nodes.
Definition at line 467 of file AbcModel.h.
|
inline |
Final status of problem 0 finished, 1 stopped, 2 difficulties.
Definition at line 473 of file AbcModel.h.
|
inline |
Number of rows in continuous (root) problem.
Definition at line 491 of file AbcModel.h.
|
inline |
Number of rows in continuous (root) problem.
Definition at line 494 of file AbcModel.h.
|
inline |
Get number of columns.
Definition at line 501 of file AbcModel.h.
|
inline |
Get number of rows.
Definition at line 505 of file AbcModel.h.
|
inline |
Get number of nonzero elements.
Definition at line 509 of file AbcModel.h.
|
inline |
Get pointer to array[getNumCols()] of column lower bounds.
Definition at line 513 of file AbcModel.h.
|
inline |
Get pointer to array[getNumCols()] of column upper bounds.
Definition at line 517 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of row constraint senses.
Definition at line 529 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of rows right-hand sides.
Definition at line 540 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of row ranges.
Definition at line 551 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of row lower bounds.
Definition at line 555 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of row upper bounds.
Definition at line 559 of file AbcModel.h.
|
inline |
Get pointer to array[getNumCols()] of objective function coefficients.
Definition at line 563 of file AbcModel.h.
|
inline |
Get objective function sense (1 for min (default), -1 for max)
Definition at line 567 of file AbcModel.h.
|
inline |
Number of rows in continuous (root) problem.
Definition at line 570 of file AbcModel.h.
|
inline |
Number of rows in continuous (root) problem.
Definition at line 573 of file AbcModel.h.
|
inline |
Return true if variable is continuous.
Definition at line 576 of file AbcModel.h.
|
inline |
Return true if variable is binary.
Definition at line 580 of file AbcModel.h.
|
inline |
Return true if column is integer.
Note: This function returns true if the the column is binary or a general integer.
Definition at line 587 of file AbcModel.h.
|
inline |
Return true if variable is general integer.
Definition at line 591 of file AbcModel.h.
|
inline |
Return true if variable is binary and not fixed at either bound.
Definition at line 595 of file AbcModel.h.
|
inline |
Get pointer to row-wise copy of matrix.
Definition at line 599 of file AbcModel.h.
|
inline |
Get pointer to column-wise copy of matrix.
Definition at line 603 of file AbcModel.h.
|
inline |
Get solver's value for infinity.
Definition at line 607 of file AbcModel.h.
double AbcModel::checkSolution | ( | double | cutoff, |
const double * | solution, | ||
bool | fixVariables | ||
) |
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)
bool AbcModel::setBestSolution | ( | ABC_Message | how, |
double & | objectiveValue, | ||
const double * | solution, | ||
bool | fixVariables = false |
||
) |
Record a new incumbent solution and update objectiveValue.
bool AbcModel::feasibleSolution | ( | int & | numberIntegerInfeasibilities | ) |
Test the current solution for feasiblility.
Scan all objects for indications of infeasibility. This is broken down into simple integer infeasibility (numberIntegerInfeasibilities
) and all other reports of infeasibility ().
|
inline |
Solution to the most recent lp relaxation.
The solver's solution to the most recent lp relaxation.
Definition at line 639 of file AbcModel.h.
|
inline |
Get pointer to array[getNumCols()] of primal solution vector.
Definition at line 643 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of dual prices.
Definition at line 647 of file AbcModel.h.
|
inline |
Get a pointer to array[getNumCols()] of reduced costs.
Definition at line 651 of file AbcModel.h.
|
inline |
Get pointer to array[getNumRows()] of row activity levels.
Definition at line 655 of file AbcModel.h.
|
inline |
Get current objective function value.
Definition at line 659 of file AbcModel.h.
|
inline |
Get best objective function value.
Definition at line 663 of file AbcModel.h.
|
inline |
Set the best objective value.
It is not necessary the value from the bestSolution_. It can be get from other processes.
Definition at line 668 of file AbcModel.h.
|
inline |
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 676 of file AbcModel.h.
|
inline |
Get number of solutions.
Definition at line 680 of file AbcModel.h.
|
inline |
Set number of solutions (so heuristics will be different)
Definition at line 684 of file AbcModel.h.
|
inline |
Get number of heuristic solutions.
Definition at line 688 of file AbcModel.h.
|
inline |
Set objective function sense (1 for min (default), -1 for max,)
Definition at line 692 of file AbcModel.h.
|
inline |
Set the maximum number of cut passes at root node (default 20) Minimum drop can also be used for fine tuning.
Definition at line 696 of file AbcModel.h.
|
inline |
Get the maximum number of cut passes at root node.
Definition at line 699 of file AbcModel.h.
|
inline |
Set the maximum number of cut passes at other nodes (default 10) Minimum drop can also be used for fine tuning.
Definition at line 704 of file AbcModel.h.
|
inline |
Get the maximum number of cut passes at other nodes (default 10)
Definition at line 707 of file AbcModel.h.
|
inline |
Number of entries in the list returned by #addedCuts()
Definition at line 710 of file AbcModel.h.
|
inline |
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)
Definition at line 712 of file AbcModel.h.
|
inline |
Get the current branching decision method.
Definition at line 727 of file AbcModel.h.
|
inline |
Set the branching decision method.
Definition at line 730 of file AbcModel.h.
|
inline |
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 735 of file AbcModel.h.
|
inline |
Pass in Message handler (not deleted at end)
Definition at line 744 of file AbcModel.h.
|
inline |
Set language.
Definition at line 755 of file AbcModel.h.
|
inline |
Pass in Message handler (not deleted at end)
Definition at line 757 of file AbcModel.h.
|
inline |
Return handler.
Definition at line 760 of file AbcModel.h.
|
inline |
Return messages.
Definition at line 763 of file AbcModel.h.
|
inline |
Return pointer to messages.
Definition at line 766 of file AbcModel.h.
|
inline |
Definition at line 772 of file AbcModel.h.
void AbcModel::findIntegers | ( | bool | startAgain | ) |
Identify integer variables and create corresponding objects.
Record integer variables and create an integer object for each one. If startAgain
is true, a new scan is forced, overwriting any existing integer variable information.
void AbcModel::addCutGenerator | ( | CglCutGenerator * | generator, |
int | howOften = 1 , |
||
const char * | name = NULL , |
||
bool | normal = true , |
||
bool | atSolution = false , |
||
bool | infeasible = false |
||
) |
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
void AbcModel::addHeuristic | ( | AbcHeuristic * | generator | ) |
Add one heuristic.
void AbcModel::reducedCostFix | ( | ) |
Perform reduced cost fixing Fixes integer variables at their current value based on reduced cost penalties.
void AbcModel::takeOffCuts | ( | ) |
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.
|
inline |
Set an integer parameter.
Definition at line 828 of file AbcModel.h.
|
inline |
Set a double parameter.
Definition at line 834 of file AbcModel.h.
|
inline |
Get an integer parameter.
Definition at line 840 of file AbcModel.h.
|
inline |
Get a double parameter.
Definition at line 845 of file AbcModel.h.
void AbcModel::setCutoff | ( | double | value | ) |
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.
|
inline |
Get the cutoff bound on the objective function - always as minimize.
Definition at line 856 of file AbcModel.h.
|
inline |
Set the maximum node limit .
Definition at line 864 of file AbcModel.h.
|
inline |
Get the maximum node limit .
Definition at line 868 of file AbcModel.h.
|
inline |
Set the maximum number of solutions desired.
Definition at line 875 of file AbcModel.h.
|
inline |
Get the maximum number of solutions desired.
Definition at line 882 of file AbcModel.h.
|
inline |
Set the integrality tolerance .
Definition at line 889 of file AbcModel.h.
|
inline |
Get the integrality tolerance .
Definition at line 895 of file AbcModel.h.
|
inline |
Set the weight per integer infeasibility .
Definition at line 903 of file AbcModel.h.
|
inline |
Get the weight per integer infeasibility .
Definition at line 910 of file AbcModel.h.
|
inline |
Set the allowable gap between the best known solution and the best possible solution.
Definition at line 917 of file AbcModel.h.
|
inline |
Get the allowable gap between the best known solution and the best possible solution.
Definition at line 923 of file AbcModel.h.
|
inline |
Set the minimum drop to continue cuts.
Definition at line 928 of file AbcModel.h.
|
inline |
Get the minimum drop to continue cuts.
Definition at line 931 of file AbcModel.h.
|
virtual |
|
inline |
Definition at line 939 of file AbcModel.h.
|
inline |
Definition at line 942 of file AbcModel.h.
|
inline |
Priorities.
Definition at line 951 of file AbcModel.h.
|
inline |
Returns priority level for an object (or 1000 if no priorities exist)
Definition at line 954 of file AbcModel.h.
|
virtual |
The method that encodes the model into a encoded object.
Reimplemented from AlpsKnowledge.
|
virtual |
The method that decodes the model from a encoded object.
Reimplemented from AlpsModel.
|
private |
Number of rows at continuous.
Definition at line 105 of file AbcModel.h.
|
private |
Number of integers in problem.
Definition at line 107 of file AbcModel.h.
|
private |
Indices of integer variables.
Definition at line 109 of file AbcModel.h.
|
private |
Pointer to a warm start basis.
Definition at line 111 of file AbcModel.h.
|
private |
Message handler.
Definition at line 115 of file AbcModel.h.
|
private |
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 121 of file AbcModel.h.
|
private |
Abc messages.
Definition at line 124 of file AbcModel.h.
|
private |
Array for integer parameters.
Definition at line 127 of file AbcModel.h.
|
private |
Array for double parameters.
Definition at line 130 of file AbcModel.h.
|
private |
The solver associated with this model.
Definition at line 133 of file AbcModel.h.
|
private |
Ownership of the solver object The convention is that AbcModel owns the null solver.
Currently there is no public method to give AbcModel a solver without giving ownership, but the hook is here.
Definition at line 139 of file AbcModel.h.
|
private |
A copy of the solver, taken at the continuous (root) node.
Definition at line 142 of file AbcModel.h.
|
private |
Pointer to a warm start basis.
Definition at line 145 of file AbcModel.h.
|
private |
Pointer to last warm basis.
Definition at line 148 of file AbcModel.h.
|
private |
Minimum degradation in objective value to continue cut generation.
Definition at line 151 of file AbcModel.h.
|
private |
Best objective.
Definition at line 154 of file AbcModel.h.
|
private |
Array holding the incumbent (best) solution.
Definition at line 157 of file AbcModel.h.
|
private |
Array holding the current solution.
This array is used more as a temporary.
Definition at line 162 of file AbcModel.h.
|
private |
Global cuts.
Definition at line 165 of file AbcModel.h.
|
private |
Cumulative number of nodes.
Definition at line 168 of file AbcModel.h.
|
private |
Cumulative number of iterations.
Definition at line 170 of file AbcModel.h.
|
private |
Status of problem - 0 finished, 1 stopped, 2 difficulties.
Definition at line 172 of file AbcModel.h.
|
private |
Number of entries in #addedCuts_.
Definition at line 174 of file AbcModel.h.
|
private |
Maximum number of cuts.
Definition at line 176 of file AbcModel.h.
|
private |
How often to scan global cuts.
Definition at line 178 of file AbcModel.h.
|
private |
Current limit on search tree depth.
The allocated size of #walkback_. Increased as needed.
Definition at line 184 of file AbcModel.h.
|
private |
Maximum number of candidates to consider for strong branching.
To disable storng branching and use pseudocost branching, set this to 0.
Definition at line 190 of file AbcModel.h.
|
private |
Number of cut generators.
Definition at line 192 of file AbcModel.h.
|
private |
Definition at line 194 of file AbcModel.h.
|
private |
Number of heuristics.
Definition at line 196 of file AbcModel.h.
|
private |
Definition at line 198 of file AbcModel.h.
|
private |
Maximum number of cut passes at root.
Definition at line 201 of file AbcModel.h.
|
private |
Maximum number of cut passes.
Definition at line 203 of file AbcModel.h.
|
private |
Variable selection function.
Definition at line 206 of file AbcModel.h.
|
private |
Number of solutions.
Definition at line 208 of file AbcModel.h.
|
private |
Number of heuristic solutions.
Definition at line 210 of file AbcModel.h.
|
private |
Priorities.
Definition at line 212 of file AbcModel.h.
|
private |
Definition at line 214 of file AbcModel.h.
|
private |
Definition at line 216 of file AbcModel.h.
|
private |
Abc parameters.
Definition at line 219 of file AbcModel.h.