master.h

Go to the documentation of this file.
00001 
00044 #ifndef ABA_MASTER_H
00045 #define ABA_MASTER_H
00046 
00047 #include "abacus/global.h"
00048 #include "abacus/optsense.h"
00049 #include "abacus/bstack.h"
00050 #include "abacus/hash.h"
00051 #include "abacus/cputimer.h"
00052 #include "abacus/cowtimer.h"
00053 #include "abacus/string.h"
00054 #include "abacus/standardpool.h"
00055 
00056 #ifdef ABACUS_PARALLEL
00057 #include "abacus/message.h"
00058 class ABA_CONVAR;
00059 class ABA_PARMASTER;
00060 class ABA_NOTIFYSERVER;
00061 #endif
00062 
00063 class ABA_SUB;
00064 class ABA_BRANCHRULE;
00065 class ABA_VARIABLE;
00066 class ABA_CONSTRAINT;
00067 
00068 class ABA_HISTORY;
00069 class ABA_OPENSUB;
00070 class ABA_FIXCAND;
00071 class ABA_LPMASTEROSI;
00072 class OsiSolverInterface;
00073 
00074 template<class BaseType, class CoType> class ABA_STANDARDPOOL;
00075 
00076   class  ABA_MASTER :  public ABA_GLOBAL  {
00077     friend class ABA_SUB;
00078     friend class ABA_FIXCAND;
00079 #ifdef ABACUS_PARALLEL
00080     friend ABA_NOTIFYSERVER;
00081     friend ABA_PARMASTER;
00082 #endif
00083     public:
00084 
00109       enum STATUS {Optimal, Error, OutOfMemory, Unprocessed, Processing,
00110                    Guaranteed, MaxLevel, MaxCpuTime,
00111                    MaxCowTime, ExceptionFathom};
00112 
00117       static const char* STATUS_[];
00118 
00131       enum OUTLEVEL {Silent, Statistics, Subproblem, LinearProgram, Full};
00132 
00133 
00138       static const char* OUTLEVEL_[];
00139 
00140 
00141       /* \brief The enumeration defining the different enumeration strategies for
00142        *        the branch and bound algorithm.
00143        *
00144        *  \param BestFirst Best-first search, i.e., select the subproblem
00145        *                  with best dual bound, i.e., the subproblem
00146        *                  having minimal dual bound for a minimization
00147        *                  problem, or the subproblem having maximal
00148        *                  dual bound for a maximization problem.
00149        *  \param BreadthFirst Breadth-first search, i.e., select the subproblem
00150        *                     with minimal level in the enumeration tree.
00151        *  \param DepthFirst Depth-first search, i.e., select the subproblem
00152        *                    with maximal level in the enumeration tree.
00153        *  \param DiveAndBest As long as no primal feasible solution is known
00154        *                    the next subproblem is selected according
00155        *                    to the depth-first search strategy, otherwise
00156        *                    the best-first search strategy is applied.
00157        */
00158       enum ENUMSTRAT {BestFirst, BreadthFirst, DepthFirst, DiveAndBest};
00163       static const char *ENUMSTRAT_[];
00164 
00175       enum BRANCHINGSTRAT {CloseHalf, CloseHalfExpensive};
00176 
00181       static const char *BRANCHINGSTRAT_[];
00182 
00202       enum PRIMALBOUNDMODE {NoPrimalBound, Optimum, OptimumOne};
00203 
00208       static const char* PRIMALBOUNDMODE_[];
00209 
00218       enum SKIPPINGMODE{SkipByNode, SkipByLevel};
00219 
00224       static const char* SKIPPINGMODE_[];
00225 
00233       enum CONELIMMODE {NoConElim, NonBinding, Basic};
00234 
00235 
00240       static const char* CONELIMMODE_[];
00241 
00249       enum VARELIMMODE {NoVarElim, ReducedCost};
00250 
00255       static const char* VARELIMMODE_[];
00256 
00266       enum VBCMODE {NoVbc, File, Pipe};
00267 
00272       static const char* VBCMODE_[];
00273 
00274 /*************************************************************************
00275  *      These are all solvers supported by OSI, 
00276  *      see https://projects.coin-or.org/Osi .
00277  *************************************************************************/
00280         enum OSISOLVER {Cbc, Clp, CPLEX, DyLP, FortMP, GLPK, MOSEK, OSL, SoPlex, SYMPHONY, Vol, XPRESS_MP};
00281 
00284       static const char* OSISOLVER_[];
00285 
00321       ABA_MASTER(const char *problemName, bool cutting, bool pricing,
00322                  ABA_OPTSENSE::SENSE optSense = ABA_OPTSENSE::Unknown,
00323                  double eps = 1.0e-4, double machineEps = 1.0e-7,
00324                  double infinity = 1.0e30,
00325                  bool readParamFromFile = true);
00326 
00328       virtual ~ABA_MASTER();
00329 #ifdef ABACUS_PARALLEL
00330 
00353       virtual ABA_CONVAR *unpackConVar(ABA_MESSAGE &msg, int classId) const;
00354 
00371       virtual ABA_BRANCHRULE *unpackBranchrule(ABA_MESSAGE &msg, int classId) const;
00372 
00382       virtual ABA_SUB *unpackSub(ABA_MESSAGE &msg) = 0;
00383 #endif
00384 
00389       STATUS optimize();
00390 
00402 
00405       double lowerBound() const;
00406 
00409       double upperBound() const;
00410 
00415       double primalBound() const;
00416 #ifdef ABACUS_PARALLEL
00417 
00424       void primalBound(double x, bool broadcast = true);
00425 #else
00426 
00434       void primalBound(double x);
00435 #endif
00436 
00441       double dualBound() const;
00442 
00451       void dualBound(double x);
00452 
00459       bool betterDual(double x) const;
00460 
00471       bool primalViolated(double x) const;
00472 
00480       bool betterPrimal(double x) const;
00481 
00493       bool feasibleFound() const;
00495 
00498       ENUMSTRAT enumerationStrategy() const;
00499 
00505       void enumerationStrategy(ENUMSTRAT strat);
00506 
00518       virtual int enumerationStrategy(const ABA_SUB *s1, const ABA_SUB *s2);
00519 
00536       bool guaranteed();
00537 
00546       double guarantee();
00547       void printGuarantee();
00553 
00565       bool check();
00566 
00581       bool knownOptimum(double &optVal);
00582 
00585       virtual void output();
00586 
00592       bool cutting() const;
00593 
00599       bool pricing() const;
00600 
00603       const ABA_OPTSENSE *optSense() const;
00604 
00608       ABA_HISTORY *history() const;
00609 
00612       ABA_OPENSUB *openSub() const;
00613 
00617       ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE> *conPool() const;
00618 
00621       ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE> *cutPool() const;
00622 
00625       ABA_STANDARDPOOL<ABA_VARIABLE, ABA_CONSTRAINT> *varPool() const;
00626 
00631       ABA_SUB *root() const;
00632 
00637       ABA_SUB *rRoot() const;
00638 
00641       STATUS status() const;
00642 
00646       const ABA_STRING *problemName() const;
00647 
00650       const ABA_COWTIMER *totalCowTime() const;
00651 
00654       inline bool solveApprox() const;
00655 
00659       const ABA_CPUTIMER *totalTime() const;
00660 
00664       const ABA_CPUTIMER *lpTime() const;
00665 
00668       const ABA_CPUTIMER *lpSolverTime() const;
00669 
00673       const ABA_CPUTIMER *separationTime() const;
00674 
00679       const ABA_CPUTIMER *improveTime() const;
00680 
00683       const ABA_CPUTIMER *pricingTime() const;
00684 
00688       const ABA_CPUTIMER *branchingTime() const;
00689 
00692       int nSub() const;
00693 
00696       int nLp() const;
00697 
00701       int highestLevel() const;
00702 
00705       int nNewRoot() const;
00706 
00710       int nSubSelected() const;
00711 
00716       void printParameters();
00717 
00720       BRANCHINGSTRAT branchingStrategy() const;
00721 
00726       void branchingStrategy(BRANCHINGSTRAT strat);
00727 
00730       OSISOLVER defaultLpSolver() const;
00731 
00736       void defaultLpSolver(OSISOLVER osiSolver);
00737 
00738 
00739       ABA_LPMASTEROSI *lpMasterOsi() const 
00740         { return lpMasterOsi_; }
00741 
00745       int nBranchingVariableCandidates() const;
00746 
00753       void nBranchingVariableCandidates(int n);
00754 
00757       double requiredGuarantee() const;
00758 
00769       void requiredGuarantee(double g);
00770 
00775       int maxLevel() const;
00776 
00785       void maxLevel(int ml);
00786 
00789       const ABA_STRING& maxCpuTime() const;
00790 
00796       void maxCpuTime(const ABA_STRING &t);
00797 
00802       const ABA_STRING& maxCowTime() const;
00803 
00810       void maxCowTime(const ABA_STRING &t);
00811 
00816       bool objInteger() const;
00817 
00825       void objInteger(bool b);
00826 
00831       int tailOffNLp() const;
00832 
00840       void tailOffNLp(int n);
00841 
00846       double tailOffPercent() const;
00847 
00856       void tailOffPercent(double p);
00857 
00860       OUTLEVEL outLevel() const;
00861 
00866       void outLevel(OUTLEVEL mode);
00867 
00870       OUTLEVEL logLevel() const;
00871 
00877       void logLevel(OUTLEVEL mode);
00878 
00885       bool delayedBranching(int nOpt_) const;
00886 
00901       void dbThreshold(int threshold);
00902 
00907       int dbThreshold() const;
00908 
00913       int minDormantRounds() const;
00914 
00919       void minDormantRounds(int nRounds);
00920 
00923       PRIMALBOUNDMODE pbMode() const;
00924 
00929       void pbMode(PRIMALBOUNDMODE mode);
00930 
00939       int pricingFreq () const;
00940 
00947       void pricingFreq(int f);
00948 
00952       int skipFactor() const;
00953 
00959       void skipFactor(int f);
00960 
00967       void skippingMode(SKIPPINGMODE mode);
00968     
00971       SKIPPINGMODE skippingMode() const;
00972 
00975       CONELIMMODE conElimMode() const;
00976 
00981       void conElimMode(CONELIMMODE mode);
00982 
00985       VARELIMMODE varElimMode() const;
00986 
00991       void varElimMode(VARELIMMODE mode);
00992 
00996       double conElimEps() const;
00997 
01002       void conElimEps(double eps);
01003 
01007       double varElimEps() const;
01008 
01009 
01015       void varElimEps(double eps);
01016  
01020       int varElimAge() const;
01021     
01026       void varElimAge(int eps);
01027 
01030       int conElimAge() const;
01031 
01036       void conElimAge(int eps);
01037 
01041       bool fixSetByRedCost() const;
01042 
01048       void fixSetByRedCost(bool on);
01049 
01054       bool printLP() const;
01055 
01061       void printLP(bool on);
01062 
01066       int maxConAdd() const;
01067 
01073       void maxConAdd(int max);
01074 
01078       int maxConBuffered() const;
01079 
01089       void maxConBuffered(int max);
01090 
01094       int maxVarAdd() const;
01095 
01101       void maxVarAdd(int max);
01102 
01106       int maxVarBuffered() const;
01107 
01116       void maxVarBuffered(int max);
01117 
01121       int maxIterations() const;
01122 
01134       void maxIterations(int max);
01135 
01140       bool eliminateFixedSet() const;
01141 
01148       void eliminateFixedSet(bool turnOn);
01149 
01155       bool newRootReOptimize() const;
01156 
01161       void newRootReOptimize(bool on);
01162 
01165       const ABA_STRING &optimumFileName() const;
01166 
01171       void optimumFileName(const char *name);
01172 
01178       bool showAverageCutDistance() const;
01179 
01186       void showAverageCutDistance(bool on);
01187 
01190       VBCMODE vbcLog() const;
01191 
01199       void vbcLog(VBCMODE mode);
01200 
01206       virtual bool setSolverParameters(OsiSolverInterface* interface, bool solverIsApprox);
01207 
01208 #ifdef ABACUS_PARALLEL
01209      ABA_PARMASTER *parmaster() const { return parmaster_; }
01210 #endif
01211     protected:
01212 
01232       virtual void initializePools(ABA_BUFFER<ABA_CONSTRAINT*> &constraints,
01233                                    ABA_BUFFER<ABA_VARIABLE*> &Variables,
01234                                    int varPoolSize,
01235                                    int cutPoolSize,
01236                                    bool dynamicCutPool = false);
01237 
01263       virtual void initializePools(ABA_BUFFER<ABA_CONSTRAINT*> &constraints,
01264                                    ABA_BUFFER<ABA_CONSTRAINT*> &cuts,
01265                                    ABA_BUFFER<ABA_VARIABLE*> &Variables,
01266                                    int varPoolSize,
01267                                    int cutPoolSize,
01268                                    bool dynamicCutPool = false);
01269 
01277       void initializeOptSense(ABA_OPTSENSE::SENSE sense);
01278 
01294       int bestFirstSearch(const ABA_SUB* s1, const ABA_SUB* s2) const;
01295 
01320       virtual int equalSubCompare(const ABA_SUB *s1, const ABA_SUB *s2) const;
01321 
01336       int depthFirstSearch(const ABA_SUB* s1, const ABA_SUB* s2) const;
01337 
01353       int breadthFirstSearch(const ABA_SUB* s1, const ABA_SUB* s2) const;
01354 
01355 
01367       int diveAndBestFirstSearch(const ABA_SUB *s1, const ABA_SUB* s2) const;
01368 
01374       virtual void initializeParameters();
01375 
01382       virtual ABA_SUB *firstSub() = 0;
01383 
01391       virtual void initializeOptimization();
01392 
01400       virtual void terminateOptimization();
01401       
01402 #ifdef ABACUS_PARALLEL
01403      ABA_PARMASTER *parmaster_;
01404 #endif
01405 
01406     private:
01407 
01427       void _initializeParameters();
01428       void _createLpMasters();
01429       void _deleteLpMasters();
01430       void _initializeLpParameters();
01431 
01438       void _setDefaultLpParameters();
01439 
01444       void _printLpParameters();
01445 
01450       void _outputLpStatistics();
01451 
01459       ABA_SUB   *select();
01460       int initLP();
01461 
01469       void writeTreeInterface(const char *info, bool time = true) const;
01470 
01475       void treeInterfaceNewNode(ABA_SUB *sub) const;
01476 #ifdef ABACUS_PARALLEL
01477 
01482       void treeInterfaceNewNode(int fatherId, int id) const;
01483       mutable ACE_Thread_Mutex treeInterfaceMutex_;
01484 #endif
01485 
01488       void treeInterfacePaintNode(int id, int color) const;
01489 
01492       void treeInterfaceLowerBound(double lb) const;
01493 
01496       void treeInterfaceUpperBound(double ub) const;
01497 
01502       void treeInterfaceNodeBounds(int id, double lb, double ub);
01503 
01509       void newSub(int level);
01510  
01513       void countLp();
01514 
01517       void newFixed(int n);
01518 
01521       void addCons(int n);
01522 
01525       void removeCons(int n);
01526 
01529       void addVars(int n);
01530 
01533       void removeVars(int n);
01534 
01537       ABA_FIXCAND *fixCand() const;
01538 
01547       void rRoot(ABA_SUB *newRoot, bool reoptimize);
01548 
01551       void status(STATUS stat);
01552 
01558       void rootDualBound(double x);
01559       void theFuture();
01560 
01563       ABA_STRING      problemName_;
01564       bool readParamFromFile_;
01565 
01568       ABA_OPTSENSE    optSense_;
01569 
01572       ABA_SUB        *root_;
01573 
01576       ABA_SUB        *rRoot_;
01577 
01580       ABA_OPENSUB    *openSub_;
01581 
01584       ABA_HISTORY    *history_;
01585 
01588       ENUMSTRAT   enumerationStrategy_;
01589 
01592       BRANCHINGSTRAT branchingStrategy_;
01593 
01597       int            nBranchingVariableCandidates_;
01598 
01601       OSISOLVER       defaultLpSolver_;
01602 
01603       ABA_LPMASTEROSI *lpMasterOsi_;
01604 
01607       ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE> *conPool_;
01608 
01609 
01612       ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE> *cutPool_;
01613 
01616       ABA_STANDARDPOOL<ABA_VARIABLE, ABA_CONSTRAINT> *varPool_;
01617 
01620       double           primalBound_;
01621 
01624       double           dualBound_;
01625 
01628       double            rootDualBound_;
01629 
01632       ABA_FIXCAND         *fixCand_;
01633 
01636       bool             cutting_;
01637 
01640       bool             pricing_;
01641 
01645       bool             solveApprox_;
01646 
01650       int              nSubSelected_;
01651 
01655       VBCMODE          VbcLog_;
01656 
01659       ostream         *treeStream_;
01660 
01666       double      requiredGuarantee_;
01667 
01672       int         maxLevel_;
01673 
01676       ABA_STRING      maxCpuTime_;
01677 
01680       ABA_STRING      maxCowTime_;
01681 
01685       bool        objInteger_;
01686 
01689       int         tailOffNLp_;
01690 
01693       double      tailOffPercent_;
01694 
01697       int         dbThreshold_;
01698 
01703       int         minDormantRounds_;
01704 
01707       OUTLEVEL    outLevel_;
01708 
01711       OUTLEVEL    logLevel_;
01712 
01715       PRIMALBOUNDMODE pbMode_;
01716 
01719       int         pricingFreq_;
01720 
01724       int         skipFactor_;
01725 
01729       SKIPPINGMODE skippingMode_;
01730 
01733       bool             fixSetByRedCost_;
01734 
01737       bool             printLP_;
01738 
01742       int              maxConAdd_;
01743 
01746       int              maxConBuffered_;
01747 
01751       int              maxVarAdd_;
01752 
01755       int              maxVarBuffered_;
01756 
01760       int              maxIterations_;
01761 
01764       bool             eliminateFixedSet_;
01765 
01769       bool             newRootReOptimize_;
01770 
01774       ABA_STRING       optimumFileName_;
01775 
01779       bool             showAverageCutDistance_;
01780 
01784       CONELIMMODE      conElimMode_;
01785 
01789       VARELIMMODE      varElimMode_;
01790 
01794       double           conElimEps_;
01795 
01799       double           varElimEps_;
01800 
01804       int              conElimAge_;
01805 
01809       int              varElimAge_;
01810 
01813       STATUS           status_;
01814 
01817       ABA_COWTIMER  totalCowTime_;
01818 
01821       ABA_CPUTIMER totalTime_;
01822 
01825       ABA_CPUTIMER lpTime_;
01826       ABA_CPUTIMER lpSolverTime_;
01827 
01830       ABA_CPUTIMER separationTime_;
01831 
01835       ABA_CPUTIMER improveTime_;
01836 
01839       ABA_CPUTIMER pricingTime_;
01840 
01843       ABA_CPUTIMER branchingTime_;
01844 
01847       int nSub_;
01848 
01851       int nLp_;
01852 
01855       int highestLevel_;
01856 
01859       int nFixed_;
01860 
01863       int nAddCons_;
01864 
01867       int nRemCons_;
01868 
01871       int nAddVars_;
01872 
01875       int nRemVars_;
01876 
01879       int nNewRoot_;
01880       ABA_MASTER(const ABA_MASTER &rhs);
01881       const ABA_MASTER &operator=(const ABA_MASTER& rhs);
01882   };
01883 
01884 
01885 inline double ABA_MASTER::lowerBound() const
01886   {
01887     if (optSense_.max()) return primalBound_;
01888     else                 return dualBound_;
01889   }
01890 
01891 inline double ABA_MASTER::upperBound() const
01892   {
01893     if (optSense_.max()) return dualBound_;
01894     else                 return primalBound_;
01895   }
01896 
01897 inline double ABA_MASTER::primalBound() const
01898   {
01899     return primalBound_;
01900   }
01901 
01902 inline double ABA_MASTER::dualBound() const
01903   {
01904     return dualBound_;
01905   }
01906 
01907 inline ABA_SUB* ABA_MASTER::root() const
01908   {
01909     return root_;
01910   }
01911 
01912 inline ABA_SUB* ABA_MASTER::rRoot() const
01913   {
01914     return rRoot_;
01915   }
01916 
01917 inline const ABA_OPTSENSE *ABA_MASTER::optSense() const
01918   {
01919     return &optSense_;
01920   }
01921 
01922 inline ABA_HISTORY *ABA_MASTER::history() const
01923   {
01924     return history_;
01925   }
01926 
01927 inline ABA_OPENSUB *ABA_MASTER::openSub() const
01928   {
01929     return openSub_;
01930   }
01931 
01932 inline ABA_FIXCAND *ABA_MASTER::fixCand() const
01933   {
01934     return fixCand_;
01935   }
01936 
01937 inline ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE> *ABA_MASTER::conPool() const
01938   {
01939     return conPool_;
01940   }
01941 
01942 inline ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE> *ABA_MASTER::cutPool() const
01943   {
01944     return cutPool_;
01945   }
01946 
01947 inline ABA_STANDARDPOOL<ABA_VARIABLE, ABA_CONSTRAINT> *ABA_MASTER::varPool() const
01948   {
01949     return varPool_;
01950   }
01951 
01952 inline bool ABA_MASTER::cutting() const
01953   {
01954     return cutting_;
01955   }
01956 
01957 inline bool ABA_MASTER::pricing() const
01958   {
01959     return pricing_;
01960   }
01961 inline bool ABA_MASTER::solveApprox() const
01962   {
01963     return solveApprox_;
01964   }
01965 
01966 inline const ABA_COWTIMER *ABA_MASTER::totalCowTime() const
01967   {
01968     return &totalCowTime_;
01969   }
01970 
01971 inline const ABA_CPUTIMER *ABA_MASTER::totalTime() const
01972   {
01973     return &totalTime_;
01974   }
01975 
01976 inline const ABA_CPUTIMER *ABA_MASTER::lpTime() const
01977   {
01978     return &lpTime_;
01979   }
01980 
01981 inline const ABA_CPUTIMER *ABA_MASTER::lpSolverTime() const
01982   {
01983     return &lpSolverTime_;
01984   }
01985 
01986 inline const ABA_CPUTIMER *ABA_MASTER::separationTime() const
01987   {
01988     return &separationTime_;
01989   }
01990 
01991 inline const ABA_CPUTIMER *ABA_MASTER::improveTime() const
01992   {
01993     return &improveTime_;
01994   }
01995 
01996 inline const ABA_CPUTIMER *ABA_MASTER::pricingTime() const
01997   {
01998     return &pricingTime_;
01999   }
02000 
02001 inline const ABA_CPUTIMER *ABA_MASTER::branchingTime() const
02002   {
02003     return &branchingTime_;
02004   }
02005 
02006 inline void ABA_MASTER::countLp()
02007   {
02008     ++nLp_;
02009   }
02010 
02011 inline void ABA_MASTER::newFixed(int n)
02012   {
02013     nFixed_ += n;
02014   }
02015 
02016 inline void ABA_MASTER::addCons(int n)
02017   {
02018     nAddCons_ += n;
02019   }
02020 
02021 inline void ABA_MASTER::removeCons(int n)
02022   {
02023     nRemCons_ += n;
02024   }
02025 
02026 inline void ABA_MASTER::addVars(int n)
02027   {
02028     nAddVars_ += n;
02029   }
02030 
02031 inline void ABA_MASTER::removeVars(int n)
02032   {
02033     nRemVars_ += n;
02034   }
02035 
02036 inline int ABA_MASTER::nSub() const
02037   {
02038     return nSub_;
02039   }
02040 
02041 inline int ABA_MASTER::nLp() const
02042   {
02043     return nLp_;
02044   }
02045 
02046 inline int ABA_MASTER::highestLevel () const
02047   {
02048     return highestLevel_;
02049   }
02050 
02051 inline int ABA_MASTER::nNewRoot() const
02052   {
02053     return nNewRoot_;
02054   }
02055 
02056 inline int ABA_MASTER::nSubSelected() const
02057   {
02058     return nSubSelected_;
02059   }
02060 
02061 inline bool ABA_MASTER::fixSetByRedCost() const
02062   {
02063     return fixSetByRedCost_;
02064   }
02065 
02066 inline void ABA_MASTER::fixSetByRedCost(bool on)
02067   {
02068     fixSetByRedCost_ = on;
02069   }
02070 
02071 inline bool ABA_MASTER::printLP() const
02072   {
02073     return printLP_;
02074   }
02075 
02076 inline void ABA_MASTER::printLP(bool on)
02077   {
02078     printLP_ = on;
02079   }
02080 
02081 inline int ABA_MASTER::maxConAdd() const
02082   {
02083     return maxConAdd_;
02084   }
02085 
02086 inline void ABA_MASTER::maxConAdd(int max)
02087   {
02088     maxConAdd_ = max;
02089   }
02090 
02091 inline int ABA_MASTER::maxConBuffered() const
02092   {
02093     return maxConBuffered_;
02094   }
02095 
02096 inline void ABA_MASTER::maxConBuffered(int max) 
02097   {
02098     maxConBuffered_ = max;
02099   }
02100 
02101 inline int ABA_MASTER::maxVarAdd() const
02102   {
02103     return maxVarAdd_;
02104   }
02105 
02106 inline void ABA_MASTER::maxVarAdd(int max)
02107   {
02108     maxVarAdd_ = max;
02109   }
02110 
02111 inline int ABA_MASTER::maxVarBuffered() const
02112   {
02113     return maxVarBuffered_;
02114   }
02115 
02116 inline void ABA_MASTER::maxVarBuffered(int max) 
02117   {
02118     maxVarBuffered_ = max;
02119   }
02120 
02121 inline int ABA_MASTER::maxIterations() const
02122   {
02123     return maxIterations_;
02124   }
02125 
02126 inline void ABA_MASTER::maxIterations(int max)
02127   {
02128     maxIterations_ = max;
02129   }
02130 
02131 inline const ABA_STRING &ABA_MASTER::optimumFileName() const
02132   {
02133     return optimumFileName_;
02134   }
02135 
02136 inline void ABA_MASTER::optimumFileName(const char *name)
02137   {
02138     optimumFileName_ = name;
02139   }
02140 
02141 inline ABA_MASTER::STATUS ABA_MASTER::status() const
02142   {
02143     return status_;
02144   }
02145 
02146 inline void ABA_MASTER::status(STATUS stat)
02147   {
02148     status_ = stat;
02149   }
02150 
02151 inline bool ABA_MASTER::eliminateFixedSet() const
02152   {
02153     return eliminateFixedSet_;
02154   }
02155 
02156 inline void ABA_MASTER::eliminateFixedSet(bool turnOn)
02157   {
02158     eliminateFixedSet_ = turnOn;
02159   }
02160 
02161 inline bool ABA_MASTER::newRootReOptimize() const
02162   {
02163     return newRootReOptimize_;
02164   }
02165 
02166 inline void ABA_MASTER::newRootReOptimize(bool on)
02167   {
02168     newRootReOptimize_ = on;
02169   }
02170 
02171 inline bool ABA_MASTER::showAverageCutDistance() const
02172   {
02173     return showAverageCutDistance_;
02174   }
02175 
02176 inline void ABA_MASTER::showAverageCutDistance(bool on)
02177   {
02178     showAverageCutDistance_ = on;
02179   }
02180 
02181 inline ABA_MASTER::VBCMODE ABA_MASTER::vbcLog() const
02182   {
02183     return VbcLog_;
02184   }
02185 
02186 inline void ABA_MASTER::vbcLog(VBCMODE mode)
02187   {
02188     VbcLog_ = mode;
02189   }
02190 
02191 inline ABA_MASTER::CONELIMMODE ABA_MASTER::conElimMode() const
02192   {
02193     return conElimMode_;
02194   }
02195 
02196 inline void ABA_MASTER::conElimMode(CONELIMMODE mode)
02197   {
02198     conElimMode_ = mode;
02199   }
02200 
02201 inline ABA_MASTER::VARELIMMODE ABA_MASTER::varElimMode() const
02202   {
02203     return varElimMode_;
02204   }
02205 
02206 inline void ABA_MASTER::varElimMode(VARELIMMODE mode)
02207   {
02208     varElimMode_ = mode;
02209   }
02210 
02211 inline double ABA_MASTER::conElimEps() const
02212   {
02213     return conElimEps_;
02214   }
02215 
02216 inline void ABA_MASTER::conElimEps(double eps)
02217   {
02218     conElimEps_ = eps;
02219   }
02220 
02221 inline double ABA_MASTER::varElimEps() const
02222   {
02223     return varElimEps_;
02224   }
02225 
02226 inline void ABA_MASTER::varElimEps(double eps)
02227   {
02228     varElimEps_ = eps;
02229   }
02230 
02231 inline int ABA_MASTER::varElimAge() const
02232   {
02233     return varElimAge_;
02234   }
02235 
02236 inline void ABA_MASTER::varElimAge(int age)
02237   {
02238     varElimAge_ = age;
02239   }
02240 
02241 inline int ABA_MASTER::conElimAge() const
02242   {
02243     return conElimAge_;
02244   }
02245 
02246 inline void ABA_MASTER::conElimAge(int age)
02247   {
02248     conElimAge_ = age;
02249   }
02250 
02251 inline ABA_MASTER::ENUMSTRAT ABA_MASTER::enumerationStrategy() const
02252   {
02253     return enumerationStrategy_;
02254   }
02255 
02256 inline void ABA_MASTER::enumerationStrategy(ENUMSTRAT strat)
02257   {
02258     enumerationStrategy_ = strat;
02259   }
02260 
02261 inline ABA_MASTER::BRANCHINGSTRAT ABA_MASTER::branchingStrategy() const
02262   {
02263     return branchingStrategy_;
02264   }
02265 
02266 inline void ABA_MASTER::branchingStrategy(BRANCHINGSTRAT strat)
02267   {
02268     branchingStrategy_ = strat;
02269   }
02270 
02271 inline ABA_MASTER::OSISOLVER ABA_MASTER::defaultLpSolver() const
02272   {
02273     return defaultLpSolver_;
02274   }
02275 
02276 inline void ABA_MASTER::defaultLpSolver(OSISOLVER lpSolver)
02277   {
02278     defaultLpSolver_ = lpSolver;
02279   }
02280 
02281 inline int ABA_MASTER::nBranchingVariableCandidates() const
02282   {
02283     return nBranchingVariableCandidates_;
02284   }
02285 
02286 inline double ABA_MASTER::requiredGuarantee() const
02287   {
02288     return requiredGuarantee_;
02289   }
02290 
02291 inline int ABA_MASTER::maxLevel() const
02292   {
02293     return maxLevel_;
02294   }
02295 
02296 inline const ABA_STRING& ABA_MASTER::maxCpuTime() const
02297   {
02298     return maxCpuTime_;
02299   }
02300 
02301 inline void ABA_MASTER::maxCpuTime(const ABA_STRING &t)
02302   {
02303     maxCpuTime_ = t;
02304   }
02305 
02306 inline const ABA_STRING& ABA_MASTER::maxCowTime() const
02307   {
02308     return maxCowTime_;
02309   }
02310 
02311 inline void ABA_MASTER::maxCowTime(const ABA_STRING &t)
02312   {
02313     maxCowTime_ = t;
02314   }
02315 
02316 inline bool ABA_MASTER::objInteger() const
02317   {
02318     return objInteger_;
02319   }
02320 
02321 inline void ABA_MASTER::objInteger(bool b)
02322   {
02323     objInteger_ = b;
02324   }
02325 
02326 inline int ABA_MASTER::tailOffNLp() const
02327   {
02328     return tailOffNLp_;
02329   }
02330 
02331 inline void ABA_MASTER::tailOffNLp(int n)
02332   {
02333     tailOffNLp_ = n;
02334   }
02335 
02336 inline double ABA_MASTER::tailOffPercent() const
02337   {
02338     return tailOffPercent_;
02339   }
02340 
02341 inline ABA_MASTER::OUTLEVEL ABA_MASTER::outLevel() const
02342   {
02343     return outLevel_;
02344   }
02345 
02346 inline void ABA_MASTER::outLevel(OUTLEVEL mode)
02347   {
02348     outLevel_ = mode;
02349   }
02350 
02351 inline ABA_MASTER::OUTLEVEL ABA_MASTER::logLevel() const
02352   {
02353     return logLevel_;
02354   }
02355 
02356 inline void ABA_MASTER::logLevel(OUTLEVEL mode)
02357   {
02358     logLevel_ = mode;
02359   }
02360 
02361 inline void ABA_MASTER::dbThreshold(int threshold)
02362   {
02363     dbThreshold_ = threshold;
02364   }
02365 
02366 inline int ABA_MASTER::dbThreshold() const
02367   {
02368     return dbThreshold_;
02369   }
02370 
02371 inline int ABA_MASTER::minDormantRounds() const
02372   {
02373     return minDormantRounds_;
02374   }
02375 
02376 inline void ABA_MASTER::minDormantRounds(int nRounds)
02377   {
02378     minDormantRounds_ = nRounds;
02379   }
02380 
02381 inline ABA_MASTER::PRIMALBOUNDMODE ABA_MASTER::pbMode() const
02382   {
02383     return pbMode_;
02384   }
02385 
02386 inline void ABA_MASTER::pbMode(PRIMALBOUNDMODE mode)
02387   {
02388     pbMode_ = mode;
02389   }
02390 
02391 inline int ABA_MASTER::pricingFreq() const
02392   {
02393     return pricingFreq_;
02394   }
02395 
02396 inline int ABA_MASTER::skipFactor() const
02397   {
02398     return skipFactor_;
02399   }
02400 
02401 inline ABA_MASTER::SKIPPINGMODE ABA_MASTER::skippingMode() const
02402   {
02403     return skippingMode_;
02404   }
02405 
02406 inline void ABA_MASTER::skippingMode(SKIPPINGMODE mode)
02407   {
02408     skippingMode_ = mode;
02409   }
02410 
02411 
02412 #endif  // ABA_MASTER_H
02413 
02414 

Generated on Tue Aug 14 18:09:54 2007 for ABACUS by  doxygen 1.5.1