source: trunk/Cbc/src/CbcGenCtlBlk.hpp @ 2465

Last change on this file since 2465 was 2465, checked in by unxusr, 10 months ago

script to format sources

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