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

Last change on this file since 1461 was 1432, checked in by bjarni, 10 years ago

Added extra return at end of each source file where needed, to remove possible linefeed conflicts (NightlyBuild? errors)

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