# CbcGenCtlBlk Class Reference

`#include <CbcGenCtlBlk.hpp>`

Collaboration diagram for CbcGenCtlBlk:
[legend]

List of all members.

## Classes
struct | babState_struct
| State of branch-and-cut. More...
struct | cbcParamsInfo_struct
| Start and end of CbcModel parameters in parameter vector. More...
struct | chooseStrongCtl_struct
| Control variables for a strong branching method. More...
struct | cliqueCtl_struct
| Control variable and prototype for clique cut generator. More...
struct | combineCtl_struct
| Control variable and prototype for combine heuristic. More...
struct | debugSolInfo_struct
| Array of primal variable values for debugging. More...
struct | djFixCtl_struct
| Control use of reduced cost fixing prior to B&C. More...
struct | flowCtl_struct
| Control variable and prototype for flow cover cut generator. More...
struct | fpumpCtl_struct
| Control variable and prototype for feasibility pump heuristic. More...
struct | genParamsInfo_struct
| Start and end of cbc-generic parameters in parameter vector. More...
struct | gomoryCtl_struct
| Control variable and prototype for Gomory cut generator. More...
struct | greedyCoverCtl_struct
| Control variable and prototype for greedy cover heuristic. More...
struct | greedyEqualityCtl_struct
| Control variable and prototype for greedy equality heuristic. More...
struct | knapsackCtl_struct
| Control variable and prototype for knapsack cover cut generator. More...
struct | localTreeCtl_struct
| Control variables for local tree. More...
struct | mirCtl_struct
| Control variable and prototype for MIR cut generator. More...
struct | oddHoleCtl_struct
| Control variable and prototype for odd hole cut generator. More...
struct | osiParamsInfo_struct
| Start and end of OsiSolverInterface parameters in parameter vector. More...
struct | probingCtl_struct
| Control variable and prototype for probing cut generator. More...
struct | redSplitCtl_struct
| Control variable and prototype for reduce-and-split cut generator. More...
struct | roundingCtl_struct
| Control variable and prototype for simple rounding heuristic. More...
struct | twomirCtl_struct
| Control variable and prototype for Two-MIR cut generator. More...
## Public Types
Enumeration types used for cbc-generic control variables
enum | IPPControl { IPPOff = 0, IPPOn, IPPSave, IPPEqual, IPPSOS, IPPTrySOS, IPPEqualAll, IPPStrategy }
| Codes to control integer preprocessing. More...
enum | CGControl { CGOff, CGOn, CGRoot, CGIfMove, CGForceOn, CGForceBut, CGMarker }
| Codes to control the use of cut generators and heuristics. More...
enum | BPControl { BPOff, BPCost, BPOrder, BPExt }
| Codes to specify the assignment of branching priorities. More...
enum | BACMajor { BACInvalid = -1, BACFinish = 0, BACStop = 1, BACAbandon = 2, BACNotRun, BACUser = 5 }
| Major status codes for branch-and-cut. More...
enum | BACMinor { BACmInvalid = -1, BACmFinish = 0, BACmInfeas, BACmUbnd, BACmGap, BACmNodeLimit, BACmTimeLimit, BACmSolnLimit, BACmUser, BACmOther }
| Minor status codes. More...
enum | BACWhere { BACwInvalid = -1, BACwNotStarted = 0, BACwBareRoot, BACwIPP, BACwIPPRelax, BACwBAC }
| Codes to specify where branch-and-cut stopped. More...
## Public Member Functions
Constructors and destructors
| CbcGenCtlBlk ()
| Default constructor.
| ~CbcGenCtlBlk ()
| Destructor.
Access and Control Functions for Cut Generators and Heuristics
Control functions, plus lazy creation functions for cut generators and heuristics cbc-generic avoids creating objects for cut generators and heuristics unless they're actually used. For cut generators, a prototype is created and reused. For heuristics, the default is to create a new object with each call, because the model may have changed. The object is returned through the reference parameter. The return value of the function is the current action state. Cut generator and heuristic objects created by these calls will be deleted with the destruction of the CbcGenCtlBlk object.
int | getCutDepth ()
| Get cut depth setting.
void | setCutDepth (int cutDepth)
| Set cut depth setting.
IPPControl | getIPPAction ()
void | setIPPAction (IPPControl action)
| Set action state for use of integer preprocessing.
CGControl | getProbing (CglCutGenerator *&gen)
| Obtain a prototype for a probing cut generator.
void | setProbingAction (CGControl action)
| Set action state for use of probing cut generator.
CGControl | getClique (CglCutGenerator *&gen)
| Obtain a prototype for a clique cut generator.
void | setCliqueAction (CGControl action)
| Set action state for use of clique cut generator.
CGControl | getFlow (CglCutGenerator *&gen)
| Obtain a prototype for a flow cover cut generator.
void | setFlowAction (CGControl action)
| Set action state for use of flow cover cut generator.
CGControl | getGomory (CglCutGenerator *&gen)
| Obtain a prototype for a Gomory cut generator.
void | setGomoryAction (CGControl action)
| Set action state for use of Gomory cut generator.
CGControl | getKnapsack (CglCutGenerator *&gen)
| Obtain a prototype for a knapsack cover cut generator.
void | setKnapsackAction (CGControl action)
| Set action state for use of knapsack cut generator.
CGControl | getMir (CglCutGenerator *&gen)
| Obtain a prototype for a mixed integer rounding (MIR) cut generator.
void | setMirAction (CGControl action)
| Set action state for use of MIR cut generator.
CGControl | getRedSplit (CglCutGenerator *&gen)
| Obtain a prototype for a reduce and split cut generator.
void | setRedSplitAction (CGControl action)
| Set action state for use of reduce and split cut generator.
CGControl | getTwomir (CglCutGenerator *&gen)
| Obtain a prototype for a 2-MIR cut generator.
void | setTwomirAction (CGControl action)
| Set action state for use of 2-MIR cut generator.
CGControl | getFPump (CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
| Obtain a feasibility pump heuristic.
void | setFPumpAction (CGControl action)
| Set action state for use of feasibility pump heuristic.
CGControl | getCombine (CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
| Obtain a local search/combine heuristic.
void | setCombineAction (CGControl action)
| Set action state for use of local search/combine heuristic.
CGControl | getGreedyCover (CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
| Obtain a greedy cover heuristic.
void | setGreedyCoverAction (CGControl action)
| Set action state for use of greedy cover heuristic.
CGControl | getGreedyEquality (CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
| Obtain a greedy equality heuristic.
void | setGreedyEqualityAction (CGControl action)
| Set action state for use of greedy equality heuristic.
CGControl | getRounding (CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
| Obtain a simple rounding heuristic.
void | setRoundingAction (CGControl action)
| Set action state for use of simple rounding heuristic.
CGControl | getTreeLocal (CbcTreeLocal *&localTree, CbcModel *model, bool alwaysCreate=true)
| Obtain a local search tree object.
void | setTreeLocalAction (CGControl action)
| Set action state for use of local tree.
Status Functions
Convenience routines for status codes.
void | setBaBStatus (BACMajor majorStatus, BACMinor minorStatus, BACWhere where, bool haveAnswer, OsiSolverInterface *answerSolver)
| Set the result of branch-and-cut search.
void | setBaBStatus (const CbcModel *model, BACWhere where, bool haveAnswer=false, OsiSolverInterface *answerSolver=0)
| Set the result of branch-and-cut search.
BACMajor | translateMajor (int status)
| Translate CbcModel major status to BACMajor.
BACMinor | translateMinor (int status)
| Translate CbcModel minor status to BACMinor.
BACMinor | translateMinor (const OsiSolverInterface *osi)
| Translate OsiSolverInterface status to BACMinor.
void | printBaBStatus ()
| Print the status block.
## Public Attributes
Parameter parsing and input/output.
std::string | version_
| cbc-generic version
std::string | dfltDirectory_
| Default directory prefix.
std::string | lastMpsIn_
| Last MPS input file.
bool | allowImportErrors_
| Allow/disallow errors when importing a model.
std::string | lastSolnOut_
| Last solution output file.
int | printMode_
| Solution printing mode.
std::string | printMask_
| Print mask.
CoinParamVec * | paramVec_
| The parameter vector.
struct CbcGenCtlBlk::genParamsInfo_struct | genParams_
| Start and end of cbc-generic parameters in parameter vector.
struct CbcGenCtlBlk::cbcParamsInfo_struct | cbcParams_
| Start and end of CbcModel parameters in parameter vector.
struct CbcGenCtlBlk::osiParamsInfo_struct | osiParams_
| Start and end of OsiSolverInterface parameters in parameter vector.
int | verbose_
| Verbosity level for help messages.
int | paramsProcessed_
| Number of parameters processed.
std::vector< bool > | setByUser_
| Record of parameters changed by user command.
bool | defaultSettings_
| False if the user has made nontrivial modifications to the default control settings.
std::string | debugCreate_
| Control debug file creation.
std::string | debugFile_
| Last debug input file.
struct CbcGenCtlBlk::debugSolInfo_struct | debugSol_
| Array of primal variable values for debugging.
double | totalTime_
| Total elapsed time for this run.
Models of various flavours
CbcModel * | model_
| The reference CbcModel object.
OsiSolverInterface * | dfltSolver_
| The current default LP solver.
bool | goodModel_
| True if we have a valid model loaded, false otherwise.
struct CbcGenCtlBlk::babState_struct | bab_
| State of branch-and-cut.
Various algorithm control variables and settings
struct CbcGenCtlBlk::djFixCtl_struct | djFix_
| Control use of reduced cost fixing prior to B&C.
BPControl | priorityAction_
| Control the assignment of branching priorities to integer variables.
Branching Method Control
Usage control and prototypes for branching methods. Looking to the future, this covers only OsiChoose methods.
struct CbcGenCtlBlk::chooseStrongCtl_struct | chooseStrong_
| Control variables for a strong branching method.
## Private Attributes
Cut Generator and Heuristic Control
Usage control and prototypes for cut generators and heuristics.
IPPControl | preProcess_
| Control integer preprocessing.
int | cutDepth_
| Control cut generator activity.
struct CbcGenCtlBlk::probingCtl_struct | probing_
| Control variable and prototype for probing cut generator.
struct CbcGenCtlBlk::cliqueCtl_struct | clique_
| Control variable and prototype for clique cut generator.
struct CbcGenCtlBlk::flowCtl_struct | flow_
| Control variable and prototype for flow cover cut generator.
struct CbcGenCtlBlk::gomoryCtl_struct | gomory_
| Control variable and prototype for Gomory cut generator.
struct CbcGenCtlBlk::knapsackCtl_struct | knapsack_
| Control variable and prototype for knapsack cover cut generator.
struct CbcGenCtlBlk::mirCtl_struct | mir_
| Control variable and prototype for MIR cut generator.
struct CbcGenCtlBlk::oddHoleCtl_struct | oddHole_
| Control variable and prototype for odd hole cut generator.
struct CbcGenCtlBlk::redSplitCtl_struct | redSplit_
| Control variable and prototype for reduce-and-split cut generator.
struct CbcGenCtlBlk::twomirCtl_struct | twomir_
| Control variable and prototype for Two-MIR cut generator.
struct CbcGenCtlBlk::fpumpCtl_struct | fpump_
| Control variable and prototype for feasibility pump heuristic.
struct CbcGenCtlBlk::combineCtl_struct | combine_
| Control variable and prototype for combine heuristic.
struct CbcGenCtlBlk::greedyCoverCtl_struct | greedyCover_
| Control variable and prototype for greedy cover heuristic.
struct CbcGenCtlBlk::greedyEqualityCtl_struct | greedyEquality_
| Control variable and prototype for greedy equality heuristic.
struct CbcGenCtlBlk::roundingCtl_struct | rounding_
| Control variable and prototype for simple rounding heuristic.
struct CbcGenCtlBlk::localTreeCtl_struct | localTree_
| Control variables for local tree.
Messages and statistics (private)
Data and objects related to messages and statistics that should be protected from direct manipulation.
CoinMessageHandler * | msgHandler_
| Message handler.
bool | ourMsgHandler_
| Ownership of message handler.
CoinMessages::Language | cur_lang_
| The current language.
CoinMessages * | msgs_
| The current set of messages.
int | logLvl_
| The current log level.
## Friends
void | CbcGenParamUtils::addCbcGenParams (int &numParams, CoinParamVec &paramVec, CbcGenCtlBlk *ctlBlk)
## Messages and statistics
int | printOpt_
| When greater than 0, integer presolve gives more information and branch-and-cut provides statistics.
CoinMessageHandler & | message (CbcGenMsgCode inID)
| Print a message.
void | passInMessageHandler (CoinMessageHandler *handler)
| Supply a new message handler.
CoinMessageHandler * | messageHandler () const
| Return a pointer to the message handler.
void | setMessages (CoinMessages::Language lang=CoinMessages::us_en)
| Set up messages in the specified language.
void | setLogLevel (int lvl)
| Set log level.
int | logLevel () const
| Get log level.

## Detailed Description

Definition at line 67 of file CbcGenCtlBlk.hpp.

## Member Enumeration Documentation

enum CbcGenCtlBlk::IPPControl

Codes to control integer preprocessing.

- IPPOff: Integer preprocessing is off.
- IPPOn: Integer preprocessing is on.
- IPPSave: IPPOn, plus preprocessed system will be saved to presolved.mps.
- IPPEqual: IPPOn, plus `<=' cliques are converted to `=' cliques.
- IPPSOS: IPPOn, plus will create SOS sets (see below).
- IPPTrySOS: IPPOn, plus will create SOS sets (see below).
- IPPEqualAll: IPPOn, plus turns all valid inequalities into equalities with integer slacks.
- IPPStrategy: look to CbcStrategy object for instructions.

IPPSOS will create SOS sets if all binary variables (except perhaps one) can be covered by SOS sets with no overlap between sets. IPPTrySOS will allow any number of binary variables to be uncovered.

Enumerator:

  IPPOff |
  IPPOn |
  IPPSave |
  IPPEqual |
  IPPSOS |
  IPPTrySOS |
  IPPEqualAll |
  IPPStrategy |

Definition at line 99 of file CbcGenCtlBlk.hpp.

enum CbcGenCtlBlk::CGControl

Codes to control the use of cut generators and heuristics.

- CGOff: the cut generator will not be installed
- CGOn: the cut generator will be installed; exactly how often it's activated depends on the settings at installation
- CGRoot: the cut generator will be installed with settings that restrict it to activation at the root node only.
- CGIfMove: the cut generator will be installed with settings that allow it to remain active only so long as it's generating cuts that tighten the relaxation.
- CGForceOn: the cut generator will be installed with settings that force it to be called at every node
- CGForceBut: the cut generator will be installed with settings that force it to be called at every node, but more active at root (probing only)
- CGMarker: a convenience to mark the end of the codes.

The same codes are used for heuristics.

Enumerator:

  CGOff |
  CGOn |
  CGRoot |
  CGIfMove |
  CGForceOn |
  CGForceBut |
  CGMarker |

Definition at line 129 of file CbcGenCtlBlk.hpp.

enum CbcGenCtlBlk::BPControl

Codes to specify the assignment of branching priorities.

- BPOff: no priorities are passed to cbc
- BPCost: a priority vector is constructed based on objective coefficients
- BPOrder: a priority vector is constructed based on column order
- BPExt: the user has provided a priority vector

Enumerator:

  BPOff |
  BPCost |
  BPOrder |
  BPExt |

Definition at line 141 of file CbcGenCtlBlk.hpp.

enum CbcGenCtlBlk::BACMajor

Major status codes for branch-and-cut.

- BACInvalid: status not yet set
- BACNotRun: branch-and-cut has not yet run for the current problem
- BACFinish: branch-and-cut has finished normally
- BACStop: branch-and-cut has stopped on a limit
- BACAbandon: branch-and-cut abandoned the problem
- BACUser: branch-and-cut stopped on user signal

Consult minorStatus_ for details.

These codes are (mostly) set to match the codes used by CbcModel. Additions to CbcModel codes should be reflected here and in translateMajor.

Enumerator:

  BACInvalid |
  BACFinish |
  BACStop |
  BACAbandon |
  BACNotRun |
  BACUser |

Definition at line 158 of file CbcGenCtlBlk.hpp.

enum CbcGenCtlBlk::BACMinor

Minor status codes.

- BACmInvalid status not yet set
- BACmFinish search exhausted the tree; optimal solution found
- BACmInfeas problem is infeasible
- BACmUbnd problem is unbounded
- BACmGap stopped on integrality gap
- BACmNodeLimit stopped on node limit
- BACmTimeLimit stopped on time limit
- BACmSolnLimit stopped on number of solutions limit
- BACmUser stopped due to user event
- BACmOther nothing else is appropriate

It's not possible to make these codes agree with CbcModel. The meaning varies according to context: if the BACWhere code specifies a relaxation, then the minor status reflects the underlying OSI solver. Otherwise, it reflects the integer problem.

Enumerator:

  BACmInvalid |
  BACmFinish |
  BACmInfeas |
  BACmUbnd |
  BACmGap |
  BACmNodeLimit |
  BACmTimeLimit |
  BACmSolnLimit |
  BACmUser |
  BACmOther |

Definition at line 181 of file CbcGenCtlBlk.hpp.

enum CbcGenCtlBlk::BACWhere

Codes to specify where branch-and-cut stopped.

- BACwNotStarted stopped before we ever got going
- BACwBareRoot stopped after initial solve of root relaxation
- BACwIPP stopped after integer preprocessing
- BACwIPPRelax stopped after initial solve of preprocessed problem
- BACwBAC stopped at some point in branch-and-cut

Enumerator:

  BACwInvalid |
  BACwNotStarted |
  BACwBareRoot |
  BACwIPP |
  BACwIPPRelax |
  BACwBAC |

Definition at line 195 of file CbcGenCtlBlk.hpp.

## Constructor & Destructor Documentation

CbcGenCtlBlk::CbcGenCtlBlk | ( |  | ) |

Default constructor.

CbcGenCtlBlk::~CbcGenCtlBlk | ( |  | ) |

Destructor.

## Member Function Documentation

int CbcGenCtlBlk::getCutDepth | ( |  | ) | `[inline]`

Get cut depth setting.

The name is a bit of a misnomer. Essentially, this overrides the `every so many nodes' control with `execute when (depth in tree) mod (cut depth) == 0'.

Definition at line 236 of file CbcGenCtlBlk.hpp.

void CbcGenCtlBlk::setCutDepth | ( | int | cutDepth | ) | `[inline]`

Set cut depth setting.

See comments for getCutDepth().

Definition at line 245 of file CbcGenCtlBlk.hpp.

IPPControl CbcGenCtlBlk::getIPPAction | ( |  | ) | `[inline]`

Definition at line 251 of file CbcGenCtlBlk.hpp.

void CbcGenCtlBlk::setIPPAction | ( | IPPControl | action | ) | `[inline]`

Set action state for use of integer preprocessing.

Definition at line 257 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getProbing | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a probing cut generator.

void CbcGenCtlBlk::setProbingAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of probing cut generator.

Definition at line 267 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getClique | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a clique cut generator.

void CbcGenCtlBlk::setCliqueAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of clique cut generator.

Definition at line 277 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getFlow | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a flow cover cut generator.

void CbcGenCtlBlk::setFlowAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of flow cover cut generator.

Definition at line 287 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getGomory | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a Gomory cut generator.

void CbcGenCtlBlk::setGomoryAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of Gomory cut generator.

Definition at line 297 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getKnapsack | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a knapsack cover cut generator.

void CbcGenCtlBlk::setKnapsackAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of knapsack cut generator.

Definition at line 307 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getMir | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a mixed integer rounding (MIR) cut generator.

void CbcGenCtlBlk::setMirAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of MIR cut generator.

Definition at line 329 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getRedSplit | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a reduce and split cut generator.

void CbcGenCtlBlk::setRedSplitAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of reduce and split cut generator.

Definition at line 339 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getTwomir | ( | CglCutGenerator *& | gen | ) |

Obtain a prototype for a 2-MIR cut generator.

void CbcGenCtlBlk::setTwomirAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of 2-MIR cut generator.

Definition at line 349 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getFPump | ( | CbcHeuristic *& | gen,
|  | CbcModel * | model,
|  | bool | alwaysCreate = `true` |
| ) |  |  |

Obtain a feasibility pump heuristic.

By default, any existing object is deleted and a new object is created and loaded with `model`. Set alwaysCreate = false to return an existing object if one exists.

void CbcGenCtlBlk::setFPumpAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of feasibility pump heuristic.

Definition at line 366 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getCombine | ( | CbcHeuristic *& | gen,
|  | CbcModel * | model,
|  | bool | alwaysCreate = `true` |
| ) |  |  |

Obtain a local search/combine heuristic.

By default, any existing object is deleted and a new object is created and loaded with `model`. Set alwaysCreate = false to return an existing object if one exists.

void CbcGenCtlBlk::setCombineAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of local search/combine heuristic.

Definition at line 382 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getGreedyCover | ( | CbcHeuristic *& | gen,
|  | CbcModel * | model,
|  | bool | alwaysCreate = `true` |
| ) |  |  |

Obtain a greedy cover heuristic.

By default, any existing object is deleted and a new object is created and loaded with `model`. Set alwaysCreate = false to return an existing object if one exists.

void CbcGenCtlBlk::setGreedyCoverAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of greedy cover heuristic.

Definition at line 398 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getGreedyEquality | ( | CbcHeuristic *& | gen,
|  | CbcModel * | model,
|  | bool | alwaysCreate = `true` |
| ) |  |  |

Obtain a greedy equality heuristic.

By default, any existing object is deleted and a new object is created and loaded with `model`. Set alwaysCreate = false to return an existing object if one exists.

void CbcGenCtlBlk::setGreedyEqualityAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of greedy equality heuristic.

Definition at line 414 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getRounding | ( | CbcHeuristic *& | gen,
|  | CbcModel * | model,
|  | bool | alwaysCreate = `true` |
| ) |  |  |

Obtain a simple rounding heuristic.

By default, any existing object is deleted and a new object is created and loaded with `model`. Set alwaysCreate = false to return an existing object if one exists.

void CbcGenCtlBlk::setRoundingAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of simple rounding heuristic.

Definition at line 430 of file CbcGenCtlBlk.hpp.

CGControl CbcGenCtlBlk::getTreeLocal | ( | CbcTreeLocal *& | localTree,
|  | CbcModel * | model,
|  | bool | alwaysCreate = `true` |
| ) |  |  |

Obtain a local search tree object.

By default, any existing object is deleted and a new object is created and loaded with `model`. Set alwaysCreate = false to return an existing object if one exists.

void CbcGenCtlBlk::setTreeLocalAction | ( | CGControl | action | ) | `[inline]`

Set action state for use of local tree.

Definition at line 446 of file CbcGenCtlBlk.hpp.

void CbcGenCtlBlk::setBaBStatus | ( | BACMajor | majorStatus,
|  | BACMinor | minorStatus,
|  | BACWhere | where,
|  | bool | haveAnswer,
|  | OsiSolverInterface * | answerSolver |
| ) |  |  | `[inline]`

Set the result of branch-and-cut search.

Definition at line 459 of file CbcGenCtlBlk.hpp.

void CbcGenCtlBlk::setBaBStatus | ( | const CbcModel * | model,
|  | BACWhere | where,
|  | bool | haveAnswer = `false`,
|  | OsiSolverInterface * | answerSolver = `0` |
| ) |  |  |

Set the result of branch-and-cut search.

This version will extract the necessary information from the CbcModel object and set appropriate status based on the value passed for where.

BACMajor CbcGenCtlBlk::translateMajor | ( | int | status | ) |

Translate CbcModel major status to BACMajor.

See the BACMajor enum for details.

BACMinor CbcGenCtlBlk::translateMinor | ( | int | status | ) |

Translate CbcModel minor status to BACMinor.

See the BACMinor enum for details.

BACMinor CbcGenCtlBlk::translateMinor | ( | const OsiSolverInterface * | osi | ) |

Translate OsiSolverInterface status to BACMinor.

See the BACMinor enum for details. Optimal, infeasible, and unbounded get their own codes; everything else maps to BACmOther.

void CbcGenCtlBlk::printBaBStatus | ( |  | ) |

Print the status block.

CoinMessageHandler& CbcGenCtlBlk::message | ( | CbcGenMsgCode | inID | ) |

Print a message.

Uses the current message handler and messages.

void CbcGenCtlBlk::passInMessageHandler | ( | CoinMessageHandler * | handler | ) |

Supply a new message handler.

Replaces the current message handler. The current handler is destroyed if ourMsgHandler_ is true, and the call will set ourMsgHandler_ = true.

CoinMessageHandler* CbcGenCtlBlk::messageHandler | ( |  | ) | const`[inline]`

Return a pointer to the message handler.

Definition at line 520 of file CbcGenCtlBlk.hpp.

void CbcGenCtlBlk::setMessages | ( | CoinMessages::Language | lang = `CoinMessages::us_en` | ) |

Set up messages in the specified language.

Building a set of messages in a given language implies rebuilding the whole set of messages, for reasons explained in the body of the code. Hence there's no separate setLanguage routine. Use this routine for the initial setup of messages and any subsequent change in language. Note that the constructor gives you a message handler by default, but not messages. You need to call setMessages explicitly.

The default value specified here for lang effectively sets the default language.

void CbcGenCtlBlk::setLogLevel | ( | int | lvl | ) | `[inline]`

Set log level.

Definition at line 539 of file CbcGenCtlBlk.hpp.

int CbcGenCtlBlk::logLevel | ( |  | ) | const`[inline]`

Get log level.

Definition at line 545 of file CbcGenCtlBlk.hpp.

## Friends And Related Function Documentation

void CbcGenParamUtils::addCbcGenParams | ( | int & | numParams,
|  | CoinParamVec & | paramVec,
|  | CbcGenCtlBlk * | ctlBlk |
| ) |  |  | `[friend]`

## Member Data Documentation

int CbcGenCtlBlk::printOpt_

When greater than 0, integer presolve gives more information and branch-and-cut provides statistics.

Definition at line 552 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::version_

cbc-generic version

Definition at line 560 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::dfltDirectory_

Default directory prefix.

Definition at line 564 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::lastMpsIn_

Last MPS input file.

Definition at line 568 of file CbcGenCtlBlk.hpp.

bool CbcGenCtlBlk::allowImportErrors_

Allow/disallow errors when importing a model.

Definition at line 571 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::lastSolnOut_

Last solution output file.

Definition at line 575 of file CbcGenCtlBlk.hpp.

int CbcGenCtlBlk::printMode_

Solution printing mode.

Controls the amount of information printed when printing a solution. Coding is set by the keyword declarations for the printingOptions command.

Definition at line 583 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::printMask_

Print mask.

Used to specify row/column names to be printed. Not implemented as of 060920.

Definition at line 590 of file CbcGenCtlBlk.hpp.

CoinParamVec* CbcGenCtlBlk::paramVec_

The parameter vector.

Definition at line 594 of file CbcGenCtlBlk.hpp.

struct CbcGenCtlBlk::genParamsInfo_struct CbcGenCtlBlk::genParams_

Start and end of cbc-generic parameters in parameter vector.

struct CbcGenCtlBlk::cbcParamsInfo_struct CbcGenCtlBlk::cbcParams_

Start and end of CbcModel parameters in parameter vector.

struct CbcGenCtlBlk::osiParamsInfo_struct CbcGenCtlBlk::osiParams_

Start and end of OsiSolverInterface parameters in parameter vector.

int CbcGenCtlBlk::verbose_

Verbosity level for help messages.

Interpretation is bitwise:

- (0): short help
- (1): long help
- (2): unused (for compatibility with cbc; indicates AMPL)
- (3): show parameters with display = false.

Definition at line 628 of file CbcGenCtlBlk.hpp.

int CbcGenCtlBlk::paramsProcessed_

Number of parameters processed.

Definition at line 632 of file CbcGenCtlBlk.hpp.

std::vector<bool> CbcGenCtlBlk::setByUser_

Record of parameters changed by user command.

Definition at line 636 of file CbcGenCtlBlk.hpp.

bool CbcGenCtlBlk::defaultSettings_

False if the user has made nontrivial modifications to the default control settings.

Initially true. Specifying DJFIX, TIGHTENFACTOR, or any cut or heuristic parameter will set this to false.

Definition at line 644 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::debugCreate_

Control debug file creation.

At the conclusion of branch-and-cut, dump the full solution in a binary format to debug.file in the current directory. When set to "createAfterPre", the solution is dumped before integer presolve transforms are removed. When set to "create", the solution is dumped after integer presolve transforms are backed out.

Definition at line 654 of file CbcGenCtlBlk.hpp.

std::string CbcGenCtlBlk::debugFile_

Last debug input file.

The file is expected to be in a binary format understood by activateRowCutDebugger.

Definition at line 662 of file CbcGenCtlBlk.hpp.

struct CbcGenCtlBlk::debugSolInfo_struct CbcGenCtlBlk::debugSol_

Array of primal variable values for debugging.

Used to provide a known optimal solution to activateRowCutDebugger().

double CbcGenCtlBlk::totalTime_

Total elapsed time for this run.

Definition at line 680 of file CbcGenCtlBlk.hpp.

CbcModel* CbcGenCtlBlk::model_

The reference CbcModel object.

This is the CbcModel created when cbc-generic boots up. It holds the default solver with the current constraint system. CbcCbcParam parameters are applied here, and CbcOsiParam parameters are applied to the solver. Major modifications for branch-and-cut (integer preprocessing, installation of heuristics and cut generators) are performed on a clone. The solution is transferred back into this object.

Definition at line 697 of file CbcGenCtlBlk.hpp.

OsiSolverInterface* CbcGenCtlBlk::dfltSolver_

The current default LP solver.

This is a pointer to a reference copy. If you want the solver associated with model_, ask for it directly.

Definition at line 705 of file CbcGenCtlBlk.hpp.

bool CbcGenCtlBlk::goodModel_

True if we have a valid model loaded, false otherwise.

Definition at line 709 of file CbcGenCtlBlk.hpp.

struct CbcGenCtlBlk::babState_struct CbcGenCtlBlk::bab_

State of branch-and-cut.

Major and minor status codes, and a solver holding the answer, assuming we have a valid answer. See the documentation with the BACMajor, BACMinor, and BACWhere enums for the meaning of the codes.

struct CbcGenCtlBlk::djFixCtl_struct CbcGenCtlBlk::djFix_

Control use of reduced cost fixing prior to B&C.

This heuristic fixes variables whose reduced cost for the root relaxtion exceeds the specified threshold. This is purely a heuristic, performed before there's any incumbent solution. It may well fix variables at the wrong bound!

BPControl CbcGenCtlBlk::priorityAction_

Control the assignment of branching priorities to integer variables.

Definition at line 747 of file CbcGenCtlBlk.hpp.

struct CbcGenCtlBlk::chooseStrongCtl_struct CbcGenCtlBlk::chooseStrong_

Control variables for a strong branching method.

Consult OsiChooseVariable and CbcModel for details. An artifact of the changeover from CbcObjects to OsiObjects is that the number of uses before pseudo costs are trusted (numBeforeTrust_) and the number of variables evaluated with strong branching (numStrong_) are parameters of CbcModel.

IPPControl CbcGenCtlBlk::preProcess_`[private]`

Control integer preprocessing.

Definition at line 781 of file CbcGenCtlBlk.hpp.

int CbcGenCtlBlk::cutDepth_`[private]`

Control cut generator activity.

Generators that are active in the tree will be activated when (depth) mod (cutDepth) == 0.

Definition at line 789 of file CbcGenCtlBlk.hpp.

struct CbcGenCtlBlk::probingCtl_struct CbcGenCtlBlk::probing_`[private]`

Control variable and prototype for probing cut generator.

struct CbcGenCtlBlk::cliqueCtl_struct CbcGenCtlBlk::clique_`[private]`

Control variable and prototype for clique cut generator.

struct CbcGenCtlBlk::flowCtl_struct CbcGenCtlBlk::flow_`[private]`

Control variable and prototype for flow cover cut generator.

struct CbcGenCtlBlk::gomoryCtl_struct CbcGenCtlBlk::gomory_`[private]`

Control variable and prototype for Gomory cut generator.

struct CbcGenCtlBlk::knapsackCtl_struct CbcGenCtlBlk::knapsack_`[private]`

Control variable and prototype for knapsack cover cut generator.

struct CbcGenCtlBlk::mirCtl_struct CbcGenCtlBlk::mir_`[private]`

Control variable and prototype for MIR cut generator.

struct CbcGenCtlBlk::oddHoleCtl_struct CbcGenCtlBlk::oddHole_`[private]`

Control variable and prototype for odd hole cut generator.

struct CbcGenCtlBlk::redSplitCtl_struct CbcGenCtlBlk::redSplit_`[private]`

Control variable and prototype for reduce-and-split cut generator.

struct CbcGenCtlBlk::twomirCtl_struct CbcGenCtlBlk::twomir_`[private]`

Control variable and prototype for Two-MIR cut generator.

struct CbcGenCtlBlk::fpumpCtl_struct CbcGenCtlBlk::fpump_`[private]`

Control variable and prototype for feasibility pump heuristic.

struct CbcGenCtlBlk::combineCtl_struct CbcGenCtlBlk::combine_`[private]`

Control variable and prototype for combine heuristic.

struct CbcGenCtlBlk::greedyCoverCtl_struct CbcGenCtlBlk::greedyCover_`[private]`

Control variable and prototype for greedy cover heuristic.

struct CbcGenCtlBlk::greedyEqualityCtl_struct CbcGenCtlBlk::greedyEquality_`[private]`

Control variable and prototype for greedy equality heuristic.

struct CbcGenCtlBlk::roundingCtl_struct CbcGenCtlBlk::rounding_`[private]`

Control variable and prototype for simple rounding heuristic.

struct CbcGenCtlBlk::localTreeCtl_struct CbcGenCtlBlk::localTree_`[private]`

Control variables for local tree.

This is a bit different --- getTreeLocal() takes a CbcModel as a parameter and installs a local tree object. But we can keep the parameters here and hide the details. Consult CbcTreeLocal.hpp for details.

CoinMessageHandler* CbcGenCtlBlk::msgHandler_`[private]`

Message handler.

Definition at line 929 of file CbcGenCtlBlk.hpp.

bool CbcGenCtlBlk::ourMsgHandler_`[private]`

Ownership of message handler.

If true, the control block owns the message handler and it will be destroyed with the control block. If false, the client is responsible for the message handler.

Definition at line 937 of file CbcGenCtlBlk.hpp.

CoinMessages::Language CbcGenCtlBlk::cur_lang_`[private]`

The current language.

Definition at line 940 of file CbcGenCtlBlk.hpp.

CoinMessages* CbcGenCtlBlk::msgs_`[private]`

The current set of messages.

Definition at line 943 of file CbcGenCtlBlk.hpp.

int CbcGenCtlBlk::logLvl_`[private]`

The current log level.

Definition at line 946 of file CbcGenCtlBlk.hpp.

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

- /home/coin/svn-release/Cbc-2.7.7/Cbc/src/CbcGenCtlBlk.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines