13 #ifndef CbcGenCtlBlk_H
14 #define CbcGenCtlBlk_H
20 #include "CoinParam.hpp"
21 #include "CoinMessageHandler.hpp"
23 #include "CglCutGenerator.hpp"
24 #include "CglProbing.hpp"
25 #include "CglClique.hpp"
26 #include "CglFlowCover.hpp"
27 #include "CglGomory.hpp"
28 #include "CglKnapsackCover.hpp"
29 #include "CglMixedIntegerRounding2.hpp"
30 #include "CglOddHole.hpp"
31 #include "CglRedSplit.hpp"
32 #include "CglTwomir.hpp"
53 #define CBC_GENERIC_VERSION "00.01.00"
56 namespace CbcGenParamUtils {
246 cutDepth_ = cutDepth ;
252 return (preProcess_) ;
258 preProcess_ = action ;
268 probing_.action_ = action ;
278 clique_.action_ = action ;
288 flow_.action_ = action ;
298 gomory_.action_ = action ;
308 knapsack_.action_ = action ;
330 mir_.action_ = action ;
340 redSplit_.action_ = action ;
350 twomir_.action_ = action ;
362 bool alwaysCreate =
true) ;
367 fpump_.action_ = action ;
378 bool alwaysCreate =
true) ;
383 combine_.action_ = action ;
394 bool alwaysCreate =
true) ;
399 greedyCover_.action_ = action ;
410 bool alwaysCreate =
true) ;
415 greedyEquality_.action_ = action ;
426 bool alwaysCreate =
true) ;
431 rounding_.action_ = action ;
442 bool alwaysCreate =
true) ;
447 localTree_.action_ = action ;
461 OsiSolverInterface *answerSolver) {
475 bool haveAnswer =
false,
476 OsiSolverInterface *answerSolver = 0) ;
536 void setMessages(CoinMessages::Language lang = CoinMessages::us_en) ;
541 if (msgHandler_) msgHandler_->setLogLevel(lvl) ;
792 struct probingCtl_struct {
795 bool usingObjective_ ;
807 struct cliqueCtl_struct {
810 bool starCliqueReport_ ;
811 bool rowCliqueReport_ ;
812 double minViolation_ ;
816 struct flowCtl_struct {
818 CglFlowCover *proto_ ;
822 struct gomoryCtl_struct {
837 struct knapsackCtl_struct {
839 CglKnapsackCover *proto_ ;
843 struct mirCtl_struct {
845 CglMixedIntegerRounding2 *proto_ ;
849 struct oddHoleCtl_struct {
857 struct redSplitCtl_struct {
859 CglRedSplit *proto_ ;
863 struct twomirCtl_struct {
870 struct fpumpCtl_struct {
877 struct combineCtl_struct {
884 struct greedyCoverCtl_struct {
890 struct greedyEqualityCtl_struct {
896 struct roundingCtl_struct {
908 struct localTreeCtl_struct {
929 CoinMessageHandler *msgHandler_ ;
937 bool ourMsgHandler_ ;
940 CoinMessages::Language cur_lang_ ;
943 CoinMessages *msgs_ ;
int logLevel() const
Get log level.
void setProbingAction(CGControl action)
Set action state for use of probing cut generator.
struct CbcGenCtlBlk::debugSolInfo_struct debugSol_
struct CbcGenCtlBlk::djFixCtl_struct djFix_
Start and end of CbcModel parameters in parameter vector.
BACMinor translateMinor(int status)
Translate CbcModel minor status to BACMinor.
void setGomoryAction(CGControl action)
Set action state for use of Gomory cut generator.
std::string lastSolnOut_
Last solution output file.
~CbcGenCtlBlk()
Destructor.
IPPControl getIPPAction()
int printMode_
Solution printing mode.
CGControl
Codes to control the use of cut generators and heuristics.
struct CbcGenCtlBlk::osiParamsInfo_struct osiParams_
std::string debugCreate_
Control debug file creation.
BACWhere
Codes to specify where branch-and-cut stopped.
void setCombineAction(CGControl action)
Set action state for use of local search/combine heuristic.
CoinMessageHandler & message(CbcGenMsgCode inID)
Print a message.
CGControl getTwomir(CglCutGenerator *&gen)
Obtain a prototype for a 2-MIR cut generator.
void setRedSplitAction(CGControl action)
Set action state for use of reduce and split cut generator.
void setFPumpAction(CGControl action)
Set action state for use of feasibility pump heuristic.
void setRoundingAction(CGControl action)
Set action state for use of simple rounding heuristic.
CGControl getFPump(CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
Obtain a feasibility pump heuristic.
void passInMessageHandler(CoinMessageHandler *handler)
Supply a new message handler.
Array of primal variable values for debugging.
bool goodModel_
True if we have a valid model loaded, false otherwise.
void setGreedyCoverAction(CGControl action)
Set action state for use of greedy cover heuristic.
Control variables for a strong branching method.
void setCliqueAction(CGControl action)
Set action state for use of clique cut generator.
CGControl getTreeLocal(CbcTreeLocal *&localTree, CbcModel *model, bool alwaysCreate=true)
Obtain a local search tree object.
Start and end of cbc-generic parameters in parameter vector.
struct CbcGenCtlBlk::cbcParamsInfo_struct cbcParams_
double totalTime_
Total elapsed time for this run.
struct CbcGenCtlBlk::genParamsInfo_struct genParams_
CbcModel * model_
The reference CbcModel object.
CGControl getMir(CglCutGenerator *&gen)
Obtain a prototype for a mixed integer rounding (MIR) cut generator.
struct CbcGenCtlBlk::babState_struct bab_
CGControl getCombine(CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
Obtain a local search/combine heuristic.
void setKnapsackAction(CGControl action)
Set action state for use of knapsack cut generator.
std::string dfltDirectory_
Default directory prefix.
BACMajor
Major status codes for branch-and-cut.
CGControl getProbing(CglCutGenerator *&gen)
Obtain a prototype for a probing cut generator.
void setFlowAction(CGControl action)
Set action state for use of flow cover cut generator.
void printBaBStatus()
Print the status block.
int printOpt_
When greater than 0, integer presolve gives more information and branch-and-cut provides statistics...
int verbose_
Verbosity level for help messages.
CbcGenMsgCode
Symbolic names for cbc-generic messages.
BPControl
Codes to specify the assignment of branching priorities.
void setLogLevel(int lvl)
Set log level.
Start and end of OsiSolverInterface parameters in parameter vector.
std::string printMask_
Print mask.
std::string version_
cbc-generic version
void setCutDepth(int cutDepth)
Set cut depth setting.
CGControl getFlow(CglCutGenerator *&gen)
Obtain a prototype for a flow cover cut generator.
void setMirAction(CGControl action)
Set action state for use of MIR cut generator.
bool allowImportErrors_
Allow/disallow errors when importing a model.
CoinParamVec * paramVec_
The parameter vector.
CbcGenCtlBlk()
Default constructor.
This file contains the enum that defines symbolic names for for cbc-generic messages.
void setIPPAction(IPPControl action)
Set action state for use of integer preprocessing.
IPPControl
Codes to control integer preprocessing.
int getCutDepth()
Get cut depth setting.
CGControl getRedSplit(CglCutGenerator *&gen)
Obtain a prototype for a reduce and split cut generator.
CGControl getRounding(CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
Obtain a simple rounding heuristic.
std::vector< bool > setByUser_
Record of parameters changed by user command.
void setMessages(CoinMessages::Language lang=CoinMessages::us_en)
Set up messages in the specified language.
BPControl priorityAction_
Control the assignment of branching priorities to integer variables.
CGControl getGreedyCover(CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
Obtain a greedy cover heuristic.
void addCbcGenParams(int &numParams, CoinParamVec ¶mVec, CbcGenCtlBlk *ctlBlk)
void setTwomirAction(CGControl action)
Set action state for use of 2-MIR cut generator.
std::string lastMpsIn_
Last MPS input file.
CGControl getGreedyEquality(CbcHeuristic *&gen, CbcModel *model, bool alwaysCreate=true)
Obtain a greedy equality heuristic.
void setTreeLocalAction(CGControl action)
Set action state for use of local tree.
struct CbcGenCtlBlk::chooseStrongCtl_struct chooseStrong_
BACMinor
Minor status codes.
CGControl getGomory(CglCutGenerator *&gen)
Obtain a prototype for a Gomory cut generator.
OsiSolverInterface * answerSolver_
bool defaultSettings_
False if the user has made nontrivial modifications to the default control settings.
CGControl getClique(CglCutGenerator *&gen)
Obtain a prototype for a clique cut generator.
OsiSolverInterface * dfltSolver_
The current default LP solver.
void setGreedyEqualityAction(CGControl action)
Set action state for use of greedy equality heuristic.
Greedy heuristic classes.
Simple Branch and bound class.
Control use of reduced cost fixing prior to B&C.
int paramsProcessed_
Number of parameters processed.
void setBaBStatus(BACMajor majorStatus, BACMinor minorStatus, BACWhere where, bool haveAnswer, OsiSolverInterface *answerSolver)
Set the result of branch-and-cut search.
CoinMessageHandler * messageHandler() const
Return a pointer to the message handler.
std::string debugFile_
Last debug input file.
BACMajor translateMajor(int status)
Translate CbcModel major status to BACMajor.
CGControl getKnapsack(CglCutGenerator *&gen)
Obtain a prototype for a knapsack cover cut generator.