source: branches/devel/Cbc/src/CbcGenCtlBlk.hpp @ 608

Last change on this file since 608 was 608, checked in by lou, 12 years ago

Cbc-generic: Add message handler, separate libCbc and cbc-generic main log
level parameters.

  • Property svn:eol-style set to native
File size: 25.8 KB
Line 
1/*
2  Copyright (C) 2007, Lou Hafer, International Business Machines Corporation
3  and others.  All Rights Reserved.
4
5  This file is part of cbc-generic.
6*/
7
8#ifndef CbcGenCtlBlk_H
9#define CbcGenCtlBlk_H
10
11/* \file CbcGenCtlBlk.hpp
12   \brief Declarations for parameters of the cbc-generic main program.
13*/
14
15#include "CoinParam.hpp"
16#include "CoinMessageHandler.hpp"
17
18#include "CglCutGenerator.hpp"
19#include "CglProbing.hpp"
20#include "CglClique.hpp"
21#include "CglFlowCover.hpp"
22#include "CglGomory.hpp"
23#include "CglKnapsackCover.hpp"
24#include "CglMixedIntegerRounding2.hpp"
25#include "CglOddHole.hpp"
26#include "CglRedSplit.hpp"
27#include "CglTwomir.hpp"
28
29#include "CbcModel.hpp"
30
31#include "CbcHeuristic.hpp"
32#include "CbcHeuristicFPump.hpp"
33#include "CbcHeuristicGreedy.hpp"
34#include "CbcHeuristicLocal.hpp"
35#include "CbcTreeLocal.hpp"
36
37#include "CbcGenMessages.hpp"
38
39/*
40  It turns out that doxygen is not good with anonymous structures. Hence the
41  `struct nameCtl_struct' style used for structured fields in CbcGenCtlBlk.
42*/
43
44/*
45  $Id$
46*/
47
48#define CBC_GENERIC_VERSION "00.01.00"
49
50class CbcGenCtlBlk ;
51namespace CbcGenParamUtils
52{
53  void addCbcGenParams(int &numParams, CoinParamVec &paramVec,
54                       CbcGenCtlBlk *ctlBlk) ;
55}
56
57/* \brief cbc-generic algorithm control class
58
59  This class defines values and methods used to control the operation of the
60  cbc-generic main program.
61*/
62
63class CbcGenCtlBlk
64{
65
66friend void CbcGenParamUtils::addCbcGenParams(int &numParams,
67        CoinParamVec &paramVec, CbcGenCtlBlk *ctlBlk) ;
68
69public:
70
71/*! \name Enumeration types used for cbc-generic control variables */
72//@{
73
74/*
75  In order for initialisation to work properly, the order of declaration of
76  the enum constants here must match the order of keyword declaration for
77  the PREPROCESS parameter in CbcGenParamUtils::addCbcGenParams
78*/
79/*! \brief Codes to control integer preprocessing
80
81  - IPPOff: Integer preprocessing is off.
82  - IPPOn:  Integer preprocessing is on.
83  - IPPSave: IPPOn, plus preprocessed system will be saved to presolved.mps.
84  - IPPEqual: IPPOn, plus `<=' cliques are converted to `=' cliques.
85  - IPPSOS: IPPOn, plus will create SOS sets (see below).
86  - IPPTrySOS: IPPOn, plus will create SOS sets (see below).
87  - IPPEqualAll: IPPOn, plus turns all valid inequalities into equalities
88                with integer slacks.
89  - IPPStrategy: look to CbcStrategy object for instructions.
90
91  IPPSOS will create SOS sets if all binary variables (except perhaps one)
92  can be covered by SOS sets with no overlap between sets. IPPTrySOS will
93  allow any number of binary variables to be uncovered.
94*/
95
96typedef enum { IPPOff = 0, IPPOn, IPPSave, IPPEqual,
97               IPPSOS, IPPTrySOS, IPPEqualAll, IPPStrategy } IPPControl ;
98
99/*
100  In order for initialisation to work properly, the order of declaration of
101  the enum constants here must match the order of keyword declaration for
102  the various cut and heuristic control parameters in
103  CbcGenParamUtils::addCbcGenParams
104*/
105/*! \brief Codes to control the use of cut generators and heuristics
106
107  - CGOff: the cut generator will not be installed
108  - CGOn:  the cut generator will be installed; exactly how often it's
109           activated depends on the settings at installation
110  - CGRoot: the cut generator will be installed with settings that restrict
111           it to activation at the root node only.
112  - CGIfMove: the cut generator will be installed with settings that allow
113           it to remain active only so long as it's generating cuts that
114           tighten the relaxation.
115  - CGForceOn: the cut generator will be installed with settings that force
116           it to be called at every node
117  - CGForceBut: the cut generator will be installed with settings that force
118           it to be called at every node, but more active at root (probing
119           only)
120  - CGMarker: a convenience to mark the end of the codes.
121
122  The same codes are used for heuristics.
123*/
124
125typedef enum { CGOff, CGOn, CGRoot, CGIfMove,
126               CGForceOn, CGForceBut, CGMarker } CGControl ;
127
128/*! \brief Codes to specify the assignment of branching priorities
129
130  - BPOff: no priorities are passed to cbc
131  - BPCost: a priority vector is constructed based on objective coefficients
132  - BPOrder: a priority vector is constructed based on column order
133  - BPExt: the user has provided a priority vector
134*/
135
136typedef enum { BPOff, BPCost, BPOrder, BPExt } BPControl ;
137
138/*! \brief Major status codes for branch-and-cut
139
140  - BACInvalid: status not yet set
141  - BACNotRun: branch-and-cut has not yet run for the current problem
142  - BACFinish: branch-and-cut has finished normally
143  - BACStop: branch-and-cut has stopped on a limit
144  - BACAbandon: branch-and-cut abandoned the problem
145  - BACUser: branch-and-cut stopped on user signal
146
147  Consult minorStatus_ for details.
148
149  These codes are (mostly) set to match the codes used by CbcModel. Additions
150  to CbcModel codes should be reflected here and in translateMajor.
151*/
152
153typedef enum { BACInvalid = -1, BACFinish = 0,
154               BACStop = 1, BACAbandon = 2, BACNotRun, BACUser = 5 } BACMajor ;
155
156/*! \brief Minor status codes
157
158  - BACmInvalid         status not yet set
159  - BACmFinish          search exhausted the tree; optimal solution found
160  - BACmInfeas          problem is infeasible
161  - BACmUbnd            problem is unbounded
162  - BACmGap             stopped on integrality gap
163  - BACmNodeLimit       stopped on node limit
164  - BACmTimeLimit       stopped on time limit
165  - BACmSolnLimit       stopped on number of solutions limit
166  - BACmUser            stopped due to user event
167  - BACmOther           nothing else is appropriate
168
169  It's not possible to make these codes agree with CbcModel. The meaning varies
170  according to context: if the BACWhere code specifies a relaxation, then the
171  minor status reflects the underlying OSI solver. Otherwise, it reflects the
172  integer problem.
173*/
174
175typedef enum { BACmInvalid = -1, BACmFinish = 0, BACmInfeas, BACmUbnd,
176               BACmGap, BACmNodeLimit, BACmTimeLimit, BACmSolnLimit,
177               BACmUser, BACmOther } BACMinor ;
178
179/*! \brief Codes to specify where branch-and-cut stopped
180
181  - BACwNotStarted      stopped before we ever got going
182  - BACwBareRoot        stopped after initial solve of root relaxation
183  - BACwIPP             stopped after integer preprocessing
184  - BACwIPPRelax        stopped after initial solve of preprocessed problem
185  - BACwBAC             stopped at some point in branch-and-cut
186*/
187
188typedef enum { BACwInvalid = -1, BACwNotStarted = 0, BACwBareRoot,
189               BACwIPP, BACwIPPRelax, BACwBAC } BACWhere ;
190
191//@}
192 
193/*! \name Constructors and destructors */
194//@{
195
196  /*! \brief Default constructor */
197
198  CbcGenCtlBlk() ;
199
200  /*! \brief Destructor */
201
202  ~CbcGenCtlBlk() ;
203//@}
204
205/*! \name Access and Control Functions for Cut Generators and Heuristics
206    \brief Control functions, plus lazy creation functions for cut generators
207           and heuristics
208
209    cbc-generic avoids creating objects for cut generators and heuristics
210    unless they're actually used. For cut generators, a prototype is created
211    and reused. For heuristics, the default is to create a new object with each
212    call, because the model may have changed. The object is returned through
213    the reference parameter. The return value of the function is the current
214    action state.
215
216    Cut generator and heuristic objects created by these calls will be deleted
217    with the destruction of the CbcGenCtlBlk object.
218*/
219//@{
220
221  /*! \brief Get cut depth setting
222
223    The name is a bit of a misnomer. Essentially, this overrides the
224    `every so many nodes' control with `execute when (depth in tree)
225    mod (cut depth) == 0'.
226  */
227
228  inline int getCutDepth() { return cutDepth_ ; } ;
229
230  /*! \brief Set cut depth setting.
231
232    See comments for getCutDepth().
233  */
234
235  inline void setCutDepth(int cutDepth) { cutDepth_ = cutDepth ; } ;
236
237  /*1 \brief Get action state for use of integer preprocessing */
238
239  inline IPPControl getIPPAction() { return (preProcess_) ; } ;
240
241  /*! \brief Set action state for use of integer preprocessing */
242
243  inline void setIPPAction(IPPControl action)
244  { preProcess_ = action ; } ;
245
246  /*! \brief Obtain a prototype for a probing cut generator. */
247
248  CGControl getProbing(CglCutGenerator *&gen) ;
249
250  /*! \brief Set action state for use of probing cut generator. */
251
252  inline void setProbingAction(CGControl action)
253  { probing_.action_ = action ; } ;
254
255  /*! \brief Obtain a prototype for a clique cut generator. */
256
257  CGControl getClique(CglCutGenerator *&gen) ;
258
259  /*! \brief Set action state for use of clique cut generator. */
260
261  inline void setCliqueAction(CGControl action)
262  { clique_.action_ = action ; } ;
263
264  /*! \brief Obtain a prototype for a flow cover cut generator. */
265
266  CGControl getFlow(CglCutGenerator *&gen) ;
267
268  /*! \brief Set action state for use of flow cover cut generator. */
269
270  inline void setFlowAction(CGControl action)
271  { flow_.action_ = action ; } ;
272
273  /*! \brief Obtain a prototype for a Gomory cut generator. */
274
275  CGControl getGomory(CglCutGenerator *&gen) ;
276
277  /*! \brief Set action state for use of Gomory cut generator. */
278
279  inline void setGomoryAction(CGControl action)
280  { gomory_.action_ = action ; } ;
281
282  /*! \brief Obtain a prototype for a knapsack cover cut generator. */
283
284  CGControl getKnapsack(CglCutGenerator *&gen) ;
285
286  /*! \brief Set action state for use of knapsack cut generator. */
287
288  inline void setKnapsackAction(CGControl action)
289  { knapsack_.action_ = action ; } ;
290
291/*  \brief Obtain a prototype for a lift-and-project cut generator.
292
293  CGControl getLandP(CglCutGenerator *&gen) ;
294
295   \brief Set action state for use of lift-and-project cut generator.
296
297  inline void setLandPAction(CGControl action)
298  { landp_.action_ = action ; } ;
299*/
300
301  /*! \brief Obtain a prototype for a mixed integer rounding (MIR)
302             cut generator.
303  */
304
305  CGControl getMir(CglCutGenerator *&gen) ;
306
307  /*! \brief Set action state for use of MIR cut generator. */
308
309  inline void setMirAction(CGControl action)
310  { mir_.action_ = action ; } ;
311
312  /*! \brief Obtain a prototype for a reduce and split cut generator. */
313
314  CGControl getRedSplit(CglCutGenerator *&gen) ;
315
316  /*! \brief Set action state for use of reduce and split cut generator. */
317
318  inline void setRedSplitAction(CGControl action)
319  { redSplit_.action_ = action ; } ;
320
321  /*! \brief Obtain a prototype for a 2-MIR cut generator. */
322
323  CGControl getTwomir(CglCutGenerator *&gen) ;
324
325  /*! \brief Set action state for use of 2-MIR cut generator. */
326
327  inline void setTwomirAction(CGControl action)
328  { twomir_.action_ = action ; } ;
329
330
331  /*! \brief Obtain a feasibility pump heuristic.
332 
333    By default, any existing object is deleted and a new object is created and
334    loaded with \c model. Set alwaysCreate = false to return an existing object
335    if one exists.
336  */
337 
338  CGControl getFPump(CbcHeuristic *&gen, CbcModel *model,
339                     bool alwaysCreate = true) ;
340
341  /*! \brief Set action state for use of feasibility pump heuristic. */
342
343  inline void setFPumpAction(CGControl action)
344  { fpump_.action_ = action ; } ;
345
346  /*! \brief Obtain a local search/combine heuristic.
347 
348    By default, any existing object is deleted and a new object is created and
349    loaded with \c model. Set alwaysCreate = false to return an existing object
350    if one exists.
351  */
352
353  CGControl getCombine(CbcHeuristic *&gen, CbcModel *model,
354                        bool alwaysCreate = true) ;
355
356  /*! \brief Set action state for use of local search/combine heuristic. */
357
358  inline void setCombineAction(CGControl action)
359  { combine_.action_ = action ; } ;
360
361  /*! \brief Obtain a greedy cover heuristic.
362 
363    By default, any existing object is deleted and a new object is created and
364    loaded with \c model. Set alwaysCreate = false to return an existing object
365    if one exists.
366  */
367
368  CGControl getGreedyCover(CbcHeuristic *&gen, CbcModel *model,
369                            bool alwaysCreate = true) ;
370
371  /*! \brief Set action state for use of greedy cover heuristic. */
372
373  inline void setGreedyCoverAction(CGControl action)
374  { greedyCover_.action_ = action ; } ;
375
376  /*! \brief Obtain a greedy equality heuristic.
377 
378    By default, any existing object is deleted and a new object is created and
379    loaded with \c model. Set alwaysCreate = false to return an existing object
380    if one exists.
381  */
382
383  CGControl getGreedyEquality(CbcHeuristic *&gen, CbcModel *model,
384                               bool alwaysCreate = true) ;
385
386  /*! \brief Set action state for use of greedy equality heuristic. */
387
388  inline void setGreedyEqualityAction(CGControl action)
389  { greedyEquality_.action_ = action ; } ;
390
391  /*! \brief Obtain a simple rounding heuristic.
392 
393    By default, any existing object is deleted and a new object is created and
394    loaded with \c model. Set alwaysCreate = false to return an existing object
395    if one exists.
396  */
397
398  CGControl getRounding(CbcHeuristic *&gen, CbcModel *model,
399                        bool alwaysCreate = true) ;
400
401  /*! \brief Set action state for use of simple rounding heuristic. */
402
403  inline void setRoundingAction(CGControl action)
404  { rounding_.action_ = action ; } ;
405
406  /*! \brief Obtain a local search tree object
407 
408    By default, any existing object is deleted and a new object is created and
409    loaded with \c model. Set alwaysCreate = false to return an existing object
410    if one exists.
411  */
412
413  CGControl getTreeLocal(CbcTreeLocal *&localTree, CbcModel *model,
414                         bool alwaysCreate = true) ;
415
416  /*! \brief Set action state for use of local tree. */
417
418  inline void setTreeLocalAction(CGControl action)
419  { localTree_.action_ = action ; } ;
420
421//@}
422
423/*! \name Status Functions
424    \brief Convenience routines for status codes.
425*/
426//@{
427
428  /*! \brief Set the result of branch-and-cut search */
429
430  inline void setBaBStatus(BACMajor majorStatus, BACMinor minorStatus,
431                           BACWhere where, bool haveAnswer,
432                           OsiSolverInterface *answerSolver)
433  { bab_.majorStatus_ = majorStatus ;
434    bab_.minorStatus_ = minorStatus ;
435    bab_.where_ = where ;
436    bab_.haveAnswer_ = haveAnswer ;
437    bab_.answerSolver_ = answerSolver ; }
438
439  /*! \brief Set the result of branch-and-cut search
440 
441    This version will extract the necessary information from the CbcModel
442    object and set appropriate status based on the value passed for where.
443  */
444  void setBaBStatus(const CbcModel *model, BACWhere where,
445                    bool haveAnswer = false,
446                    OsiSolverInterface *answerSolver = 0) ;
447
448  /*! \brief Translate CbcModel major status to #BACMajor
449 
450    See the #BACMajor enum for details.
451  */
452  BACMajor translateMajor(int status) ;
453
454  /*!\brief Translate CbcModel minor status to #BACMinor
455
456    See the #BACMinor enum for details.
457  */
458  BACMinor translateMinor(int status) ;
459
460  /*!\brief Translate OsiSolverInterface status to #BACMinor
461
462    See the #BACMinor enum for details. Optimal, infeasible, and unbounded
463    get their own codes; everything else maps to BACmOther.
464  */
465  BACMinor translateMinor(const OsiSolverInterface *osi) ;
466
467  /*! \brief Print the status block */
468
469  void printBaBStatus() ;
470
471//@}
472
473/*! \name Messages and statistics */
474//@{
475
476  /*! \brief Print a message
477
478    Uses the current message handler and messages.
479  */
480  CoinMessageHandler &message(CbcGenMsgCode inID) ;
481
482  /*! \brief Supply a new message handler.
483
484    Replaces the current message handler. The current handler is destroyed
485    if ourMsgHandler_ is true, and the call will set ourMsgHandler_ = true.
486  */
487  void passInMessageHandler(CoinMessageHandler *handler) ;
488
489  /*! \brief Return a pointer to the message handler */
490  inline CoinMessageHandler *messageHandler() const { return msgHandler_ ; } ;
491
492  /*! \brief Set up messages in the specified language.
493
494    Building a set of messages in a given language implies rebuilding the
495    whole set of messages, for reasons explained in the body of the code.
496    Hence there's no separate setLanguage routine. Use this routine for the
497    initial setup of messages and any subsequent change in language. Note
498    that the constructor gives you a message handler by default, but \e not
499    messages. You need to call setMessages explicitly.
500
501    The default value specified here for lang effectively sets the default
502    language.
503  */
504  void setMessages(CoinMessages::Language lang = CoinMessages::us_en) ;
505
506  /*! \brief Set log level */
507  inline void setLogLevel(int lvl)
508  { logLvl_ = lvl ;
509    if (msgHandler_) msgHandler_->setLogLevel(lvl) ; } ;
510
511  /*! \brief Get log level */
512  inline int logLevel() const { return (logLvl_) ; } ;
513
514  /*! \brief When greater than 0, integer presolve gives more information and
515             branch-and-cut provides statistics.
516  */
517  int printOpt_ ;
518
519//@}
520
521/*! \name Parameter parsing and input/output. */
522//@{
523  /*! \brief cbc-generic version */
524
525  std::string version_ ;
526
527  /*! \brief Default directory prefix */
528
529  std::string dfltDirectory_ ;
530
531  /*! \brief Last MPS input file */
532
533  std::string lastMpsIn_ ;
534
535  /*! \brief Allow/disallow errors when importing a model */
536  bool allowImportErrors_ ;
537
538  /*! \brief Last solution output file */
539
540  std::string lastSolnOut_ ;
541
542  /*! \brief Solution printing mode
543
544    Controls the amount of information printed when printing a solution.
545    Coding is set by the keyword declarations for the printingOptions
546    command.
547  */
548  int printMode_ ;
549
550  /*! \brief Print mask
551
552    Used to specify row/column names to be printed. Not implemented as of
553    060920.
554  */
555  std::string printMask_ ;
556
557  /*! \brief The parameter vector */
558
559  CoinParamVec *paramVec_ ;
560
561  /*! \brief Start and end of cbc-generic parameters in parameter vector */
562
563  struct genParamsInfo_struct
564  { int first_ ;
565    int last_ ; } genParams_ ;
566
567  /*! \brief Start and end of CbcModel parameters in parameter vector */
568
569  struct cbcParamsInfo_struct
570  { int first_ ;
571    int last_ ; } cbcParams_ ;
572
573  /*! \brief Start and end of OsiSolverInterface  parameters in parameter
574             vector
575  */
576
577  struct osiParamsInfo_struct
578  { int first_ ;
579    int last_ ; } osiParams_ ;
580
581  /*! \brief Verbosity level for help messages.
582 
583    Interpretation is bitwise:
584    - (0): short help
585    - (1): long help
586    - (2): unused (for compatibility with cbc; indicates AMPL)
587    - (3): show parameters with display = false.
588  */
589
590  int verbose_ ;
591
592  /*! \brief Number of parameters processed */
593
594  int paramsProcessed_ ;
595
596  /*! \brief Record of parameters changed by user command */
597
598  std::vector<bool> setByUser_ ;
599
600  /*! \brief False if the user has made nontrivial modifications to the
601             default control settings.
602
603    Initially true. Specifying DJFIX, TIGHTENFACTOR, or any cut or heuristic
604    parameter will set this to false.
605  */
606  bool defaultSettings_ ;
607
608  /*! \brief Control debug file creation
609
610    At the conclusion of branch-and-cut, dump the full solution in a binary
611    format to debug.file in the current directory.  When set to
612    "createAfterPre", the solution is dumped before integer presolve
613    transforms are removed.  When set to "create", the solution is dumped
614    after integer presolve transforms are backed out.
615  */
616  std::string debugCreate_ ;
617
618  /*! \brief Last debug input file
619 
620    The file is expected to be in a binary format understood by
621    activateRowCutDebugger.
622  */
623
624  std::string debugFile_ ;
625
626  /*! \brief Array of primal variable values for debugging
627
628    Used to provide a known optimal solution to activateRowCutDebugger().
629  */
630
631  struct debugSolInfo_struct
632  { int numCols_ ;
633    double *values_ ; } debugSol_ ;
634//@}
635
636/* \name Timing */
637//@{
638
639  /*! \brief Total elapsed time for this run. */
640
641  double totalTime_ ;
642
643//@}
644
645/*! \name Models of various flavours */
646//@{
647
648  /*! \brief The reference CbcModel object.
649
650    This is the CbcModel created when cbc-generic boots up. It holds the
651    default solver with the current constraint system. CbcCbcParam parameters
652    are applied here, and CbcOsiParam parameters are applied to the solver.
653    Major modifications for branch-and-cut (integer preprocessing,
654    installation of heuristics and cut generators) are performed on a clone.
655    The solution is transferred back into this object.
656  */
657
658  CbcModel *model_ ;
659
660  /*! \brief The current default LP solver
661 
662    This is a pointer to a reference copy. If you want the solver associated
663    with #model_, ask for it directly.
664  */
665
666  OsiSolverInterface *dfltSolver_ ;
667
668  /*! \brief True if we have a valid model loaded, false otherwise. */
669
670  bool goodModel_ ;
671
672  /*! \brief State of branch-and-cut
673
674    Major and minor status codes, and a solver holding the answer, assuming
675    we have a valid answer. See the documentation with the BACMajor,
676    BACMinor, and BACWhere enums for the meaning of the codes.
677  */
678
679  struct babState_struct
680  { BACMajor majorStatus_ ;
681    BACMinor minorStatus_ ;
682    BACWhere where_ ;
683    bool haveAnswer_ ;
684    OsiSolverInterface *answerSolver_ ; } bab_ ;
685
686//@}
687
688/*! \name Various algorithm control variables and settings */
689//@{
690
691  /*! \brief Control use of reduced cost fixing prior to B&C
692
693    This heuristic fixes variables whose reduced cost for the root
694    relaxtion exceeds the specified threshold. This is purely a heuristic,
695    performed before there's any incumbent solution. It may well fix variables
696    at the wrong bound!
697  */
698
699  struct djFixCtl_struct
700  { bool action_ ;
701    double threshold_ ; } djFix_ ;
702
703  /*! \brief Control the assignment of branching priorities to integer
704             variables.
705  */
706  BPControl priorityAction_ ;
707
708//@}
709
710/*! \name Branching Method Control
711    \brief Usage control and prototypes for branching methods.
712
713    Looking to the future, this covers only OsiChoose methods.
714*/
715//@{
716
717  /*! \brief Control variables for a strong branching method.
718 
719    Consult OsiChooseVariable and CbcModel for details. An artifact of the
720    changeover from CbcObjects to OsiObjects is that the number of uses before
721    pseudo costs are trusted (numBeforeTrust_) and the number of variables
722    evaluated with strong branching (numStrong_) are parameters of CbcModel.
723  */
724  struct chooseStrongCtl_struct
725  { int numBeforeTrust_ ;
726    int numStrong_ ;
727    int shadowPriceMode_ ; } chooseStrong_ ;
728//@}
729
730private:
731
732/*! \name Cut Generator and Heuristic Control
733    \brief Usage control and prototypes for cut generators and heuristics.
734*/
735//@{
736
737  /*! \brief Control integer preprocessing. */
738
739  IPPControl preProcess_ ;
740
741  /*! \brief Control cut generator activity
742 
743    Generators that are active in the tree will be activated when
744    (depth) mod (cutDepth) == 0.
745  */
746
747  int cutDepth_ ;
748
749  /*! \brief Control variable and prototype for probing cut generator */
750  struct probingCtl_struct
751  { CGControl action_ ;
752    CglProbing *proto_ ;
753    bool usingObjective_ ;
754    int maxPass_ ;
755    int maxPassRoot_ ;
756    int maxProbe_ ;
757    int maxProbeRoot_ ;
758    int maxLook_ ;
759    int maxLookRoot_ ;
760    int maxElements_ ;
761    int rowCuts_ ; } probing_ ;
762
763  /*! \brief Control variable and prototype for clique cut generator */
764  struct cliqueCtl_struct
765  { CGControl action_ ;
766    CglClique *proto_ ;
767    bool starCliqueReport_ ;
768    bool rowCliqueReport_ ;
769    double minViolation_ ; } clique_ ;
770
771  /*! \brief Control variable and prototype for flow cover cut generator */
772  struct flowCtl_struct
773  { CGControl action_ ;
774    CglFlowCover *proto_ ; } flow_ ;
775
776  /*! \brief Control variable and prototype for Gomory cut generator */
777  struct gomoryCtl_struct
778  { CGControl action_ ;
779    CglGomory *proto_ ;
780    int limit_ ;
781    int limitAtRoot_ ; } gomory_ ;
782
783/*   \brief Control variable and prototype for lift-and-project cut
784             generator
785   struct landpCtl_struct
786   { CGControl action_ ;
787     CglLandP *proto_ ; } landp_ ;
788*/
789
790  /*! \brief Control variable and prototype for knapsack cover cut generator */
791  struct knapsackCtl_struct
792  { CGControl action_ ;
793    CglKnapsackCover *proto_ ; } knapsack_ ;
794
795  /*! \brief Control variable and prototype for MIR cut generator */
796  struct mirCtl_struct
797  { CGControl action_ ;
798    CglMixedIntegerRounding2 *proto_ ; } mir_ ;
799
800  /*! \brief Control variable and prototype for odd hole cut generator */
801  struct oddHoleCtl_struct
802  { CGControl action_ ;
803    CglOddHole *proto_ ; } oddHole_ ;
804
805  /*! \brief Control variable and prototype for reduce-and-split
806             cut generator
807  */
808  struct redSplitCtl_struct
809  { CGControl action_ ;
810    CglRedSplit *proto_ ; } redSplit_ ;
811
812  /*! \brief Control variable and prototype for Two-MIR cut generator */
813  struct twomirCtl_struct
814  { CGControl action_ ;
815    CglTwomir *proto_ ;
816    int maxElements_ ; } twomir_ ;
817
818  /*! \brief Control variable and prototype for feasibility pump heuristic */
819  struct fpumpCtl_struct
820  { CGControl action_ ;
821    CbcHeuristicFPump *proto_ ;
822    int iters_ ; } fpump_ ;
823
824  /*! \brief Control variable and prototype for combine heuristic */
825  struct combineCtl_struct
826  { CGControl action_ ;
827    CbcHeuristicLocal *proto_ ;
828    int trySwap_ ; } combine_ ;
829
830  /*! \brief Control variable and prototype for greedy cover heuristic */
831  struct greedyCoverCtl_struct
832  { CGControl action_ ;
833    CbcHeuristicGreedyCover *proto_ ; } greedyCover_ ;
834
835  /*! \brief Control variable and prototype for greedy equality heuristic */
836  struct greedyEqualityCtl_struct
837  { CGControl action_ ;
838    CbcHeuristicGreedyEquality *proto_ ; } greedyEquality_ ;
839
840  /*! \brief Control variable and prototype for simple rounding heuristic */
841  struct roundingCtl_struct
842  { CGControl action_ ;
843    CbcRounding *proto_ ; } rounding_ ;
844
845
846  /*! \brief Control variables for local tree
847 
848    This is a bit different --- getTreeLocal() takes a CbcModel as a parameter
849    and installs a local tree object. But we can keep the parameters here and
850    hide the details. Consult CbcTreeLocal.hpp for details.
851  */
852  struct localTreeCtl_struct
853  { CGControl action_ ;
854    CbcTreeLocal *proto_ ;
855    double *soln_ ;
856    int range_ ;
857    int typeCuts_ ;
858    int maxDiverge_ ;
859    int timeLimit_ ;
860    int nodeLimit_ ;
861    bool refine_ ; } localTree_ ;
862
863//@}
864
865/*! \name Messages and statistics (private)
866    \brief Data and objects related to messages and statistics that should be
867           protected from direct manipulation.
868*/
869//@{
870
871  /*! \brief Message handler. */
872  CoinMessageHandler *msgHandler_ ;
873
874  /*! \brief Ownership of message handler.
875
876    If true, the control block owns the message handler and it will be destroyed
877    with the control block. If false, the client is responsible for the message
878    handler.
879  */
880  bool ourMsgHandler_ ;
881
882  /*! \brief The current language */
883  CoinMessages::Language cur_lang_ ;
884
885  /*! \brief The current set of messages. */
886  CoinMessages *msgs_ ;
887
888  /*! \brief The current log level */
889  int logLvl_ ;
890
891//@}
892
893} ;
894
895
896#endif
Note: See TracBrowser for help on using the repository browser.