/home/coin/SVN-release/Cbc-1.2.0/Cbc/src/CbcModel.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2002, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef CbcModel_H
00004 #define CbcModel_H
00005 #include <string>
00006 #include <vector>
00007 #include "CoinFinite.hpp"
00008 #include "CoinMessageHandler.hpp"
00009 #include "OsiSolverInterface.hpp"
00010 #include "OsiCuts.hpp"
00011 #include "CoinWarmStartBasis.hpp"
00012 #include "CbcCompareBase.hpp"
00013 #include "CbcMessage.hpp"
00014 
00015 //class OsiSolverInterface;
00016 
00017 class CbcCutGenerator;
00018 class OsiRowCut;
00019 class OsiBabSolver;
00020 class OsiRowCutDebugger;
00021 class CglCutGenerator;
00022 class CbcHeuristic;
00023 class CbcObject;
00024 class CbcTree;
00025 class CbcStrategy;
00026 class CbcFeasibilityBase;
00027 class CbcStatistics;
00028 class CbcEventHandler ;
00029 
00030 //#############################################################################
00031 
00084 class CbcModel  {
00085   
00086 public:
00087 
00088 enum CbcIntParam {
00090   CbcMaxNumNode=0,
00092   CbcMaxNumSol,
00102   CbcFathomDiscipline,
00104   CbcLastIntParam
00105 };
00106 
00107 enum CbcDblParam {
00110   CbcIntegerTolerance=0,
00113   CbcInfeasibilityWeight,
00116   CbcCutoffIncrement,
00123   CbcAllowableGap,
00130   CbcAllowableFractionGap,
00133   CbcMaximumSeconds,
00135   CbcCurrentCutoff,
00137   CbcOptimizationDirection,
00139   CbcCurrentObjectiveValue,
00141   CbcCurrentMinimizationObjectiveValue,
00144   CbcStartSeconds,
00146   CbcLastDblParam
00147 };
00148 
00149   //---------------------------------------------------------------------------
00150 
00151 public:
00153 
00154 
00158     void initialSolve(); 
00159 
00170      void branchAndBound(int doStatistics=0);
00171 
00176      CbcModel *  cleanModel(const double * lower, const double * upper);
00193      int subBranchAndBound(CbcModel * model2,
00194                            CbcModel * presolvedModel,
00195                            int maximumNodes);
00211      int subBranchAndBound(const double * lower, const double * upper,
00212                             int maximumNodes);
00213 
00220      OsiSolverInterface *  strengthenedModel();
00221 private:
00229   bool solveWithCuts(OsiCuts & cuts, int numberTries,CbcNode * node);
00236   CbcNode ** solveOneNode(int whichSolver,CbcNode * node, 
00237                           int & numberNodesOutput, int & status) ;
00239   void resizeWhichGenerator(int numberNow, int numberAfter);
00240 public:
00254     int resolve(CbcNodeInfo * parent, int whereFrom);
00256     void makeGlobalCuts(int numberRows,const int * which); 
00258 
00261 
00273   CbcModel * findCliques(bool makeEquality, int atLeastThisMany,
00274                          int lessThanThis, int defaultValue=1000);
00275 
00284   CbcModel * integerPresolve(bool weak=false);
00285 
00290   bool integerPresolveThisModel(OsiSolverInterface * originalSolver,bool weak=false);
00291 
00292 
00294   void originalModel(CbcModel * presolvedModel,bool weak);
00295 
00316   bool tightenVubs(int type,bool allowMultipleBinary=false,
00317                    double useCutoff=1.0e50);
00318   
00324   bool tightenVubs(int numberVubs, const int * which,
00325                    double useCutoff=1.0e50);
00329   void analyzeObjective();
00330 
00331 
00333 
00339 
00341   inline int numberObjects() const { return numberObjects_;};
00343   inline void setNumberObjects(int number) 
00344   {  numberObjects_=number;};
00345 
00347   inline CbcObject ** objects() const { return object_;};
00348 
00350   const inline CbcObject * object(int which) const { return object_[which];};
00352   inline CbcObject * modifiableObject(int which) const { return object_[which];};
00353 
00355   void deleteObjects();
00356 
00361   void addObjects(int numberObjects, CbcObject ** objects);
00362 
00364   void synchronizeModel() ;
00365 
00375   void findIntegers(bool startAgain,int type=0);
00376 
00378 
00379   //---------------------------------------------------------------------------
00380 
00390 
00391   inline bool setIntParam(CbcIntParam key, int value) {
00392     intParam_[key] = value;
00393     return true;
00394   }
00396   inline bool setDblParam(CbcDblParam key, double value) {
00397     dblParam_[key] = value;
00398     return true;
00399   }
00401   inline int getIntParam(CbcIntParam key) const {
00402     return intParam_[key];
00403   }
00405   inline double getDblParam(CbcDblParam key) const {
00406     return dblParam_[key];
00407   }
00413   void setCutoff(double value) ;
00414 
00416   inline double getCutoff() const
00417   { //double value ;
00418     //solver_->getDblParam(OsiDualObjectiveLimit,value) ;
00419     //assert( dblParam_[CbcCurrentCutoff]== value * solver_->getObjSense());
00420     return dblParam_[CbcCurrentCutoff];
00421   }
00422 
00424   inline bool setMaximumNodes( int value)
00425   { return setIntParam(CbcMaxNumNode,value); }
00426 
00428   inline int getMaximumNodes() const
00429   { return getIntParam(CbcMaxNumNode); }
00430 
00435   inline bool setMaximumSolutions( int value) {
00436     return setIntParam(CbcMaxNumSol,value);
00437   }
00442   inline int getMaximumSolutions() const {
00443     return getIntParam(CbcMaxNumSol);
00444   }
00445 
00450   inline bool setMaximumSeconds( double value) {
00451     return setDblParam(CbcMaximumSeconds,value);
00452   }
00457   inline double getMaximumSeconds() const {
00458     return getDblParam(CbcMaximumSeconds);
00459   }
00461   double getCurrentSeconds() const ;
00462 
00466   inline bool setIntegerTolerance( double value) {
00467     return setDblParam(CbcIntegerTolerance,value);
00468   }
00472   inline double getIntegerTolerance() const {
00473     return getDblParam(CbcIntegerTolerance);
00474   }
00475 
00480   inline bool setInfeasibilityWeight( double value) {
00481     return setDblParam(CbcInfeasibilityWeight,value);
00482   }
00487   inline double getInfeasibilityWeight() const {
00488     return getDblParam(CbcInfeasibilityWeight);
00489   }
00490 
00494   inline bool setAllowableGap( double value) {
00495     return setDblParam(CbcAllowableGap,value);
00496   }
00500   inline double getAllowableGap() const {
00501     return getDblParam(CbcAllowableGap);
00502   }
00503 
00507   inline bool setAllowableFractionGap( double value) {
00508     return setDblParam(CbcAllowableFractionGap,value);
00509   }
00513   inline double getAllowableFractionGap() const {
00514     return getDblParam(CbcAllowableFractionGap);
00515   }
00519   inline bool setAllowablePercentageGap( double value) {
00520     return setDblParam(CbcAllowableFractionGap,value*0.01);
00521   }
00525   inline double getAllowablePercentageGap() const {
00526     return 100.0*getDblParam(CbcAllowableFractionGap);
00527   }
00532   inline bool setCutoffIncrement( double value) {
00533     return setDblParam(CbcCutoffIncrement,value);
00534   }
00539   inline double getCutoffIncrement() const {
00540     return getDblParam(CbcCutoffIncrement);
00541   }
00542 
00547   void setHotstartSolution(const double * solution, const int * priorities=NULL) ;
00548   
00550   inline void setMinimumDrop(double value)
00551   {minimumDrop_=value;};
00553   inline double getMinimumDrop() const
00554   { return minimumDrop_;};
00555 
00558   inline void setMaximumCutPassesAtRoot(int value)
00559   {maximumCutPassesAtRoot_=value;};
00561   inline int getMaximumCutPassesAtRoot() const
00562   { return maximumCutPassesAtRoot_;};
00563 
00566   inline void setMaximumCutPasses(int value)
00567   {maximumCutPasses_=value;};
00569   inline int getMaximumCutPasses() const
00570   { return maximumCutPasses_;};
00573   inline int getCurrentPassNumber() const
00574   { return currentPassNumber_;};
00575 
00581   void setNumberStrong(int number);
00585   inline int numberStrong() const
00586   { return numberStrong_;};
00590   inline void setSizeMiniTree(int value)
00591   { sizeMiniTree_=value;};
00592   inline int sizeMiniTree() const
00593   { return sizeMiniTree_;};
00594 
00600   void setNumberBeforeTrust(int number);
00603   inline int numberBeforeTrust() const
00604   { return numberBeforeTrust_;};
00610   void setNumberPenalties(int number);
00613   inline int numberPenalties() const
00614   { return numberPenalties_;};
00616   inline void setNumberAnalyzeIterations(int number)
00617   { numberAnalyzeIterations_=number;};
00618   inline int numberAnalyzeIterations() const
00619   { return numberAnalyzeIterations_;};
00622   inline double penaltyScaleFactor() const
00623   { return penaltyScaleFactor_;};
00626   void setPenaltyScaleFactor(double value);
00634   void inline setProblemType(int number)
00635   { problemType_=number;};
00636   inline int problemType() const
00637   { return problemType_;};
00638 
00640   void setHowOftenGlobalScan(int number);
00642   inline int howOftenGlobalScan() const
00643   { return howOftenGlobalScan_;};
00645   inline int * originalColumns() const
00646   { return originalColumns_;};
00647 
00655   inline void setPrintFrequency(int number)
00656   { printFrequency_=number;};
00658   inline int printFrequency() const
00659   { return printFrequency_;};
00661 
00662   //---------------------------------------------------------------------------
00664 
00665 
00666     bool isAbandoned() const;
00668     bool isProvenOptimal() const;
00670     bool isProvenInfeasible() const;
00672     bool isContinuousUnbounded() const;
00674     bool isProvenDualInfeasible() const;
00676     bool isNodeLimitReached() const;
00678     bool isSecondsLimitReached() const;
00680     bool isSolutionLimitReached() const;
00682     inline int getIterationCount() const
00683     { return numberIterations_;};
00685     inline int getNodeCount() const
00686     { return numberNodes_;};
00696     inline int status() const
00697     { return status_;};
00698     inline void setProblemStatus(int value)
00699     { status_=value;};
00711     inline int secondaryStatus() const
00712     { return secondaryStatus_;};
00713     inline void setSecondaryStatus(int value)
00714     { secondaryStatus_=value;};
00716     bool isInitialSolveAbandoned() const ;
00718     bool isInitialSolveProvenOptimal() const ;
00720     bool isInitialSolveProvenPrimalInfeasible() const ;
00722     bool isInitialSolveProvenDualInfeasible() const ;
00723 
00725 
00726   //---------------------------------------------------------------------------
00739 
00740   inline int numberRowsAtContinuous() const
00741   { return numberRowsAtContinuous_;};
00742 
00744   inline int getNumCols() const
00745   { return solver_->getNumCols();};
00746   
00748   inline int getNumRows() const
00749   { return solver_->getNumRows();};
00750   
00752   inline CoinBigIndex getNumElements() const
00753   { return solver_->getNumElements();};
00754 
00756   inline int numberIntegers() const
00757   { return numberIntegers_;};
00758   // Integer variables
00759   inline const int * integerVariable() const 
00760   { return integerVariable_;};
00762   inline const char integerType(int i) const
00763   { return integerInfo_[i];};
00765   inline const char * integerType() const
00766   { return integerInfo_;};
00767 
00769   inline const double * getColLower() const
00770   { return solver_->getColLower();};
00771   
00773   inline const double * getColUpper() const
00774   { return solver_->getColUpper();};
00775   
00785   inline const char * getRowSense() const
00786   { return solver_->getRowSense();};
00787   
00796   inline const double * getRightHandSide() const
00797   { return solver_->getRightHandSide();};
00798   
00807   inline const double * getRowRange() const
00808   { return solver_->getRowRange();};
00809   
00811   inline const double * getRowLower() const
00812   { return solver_->getRowLower();};
00813   
00815   inline const double * getRowUpper() const
00816   { return solver_->getRowUpper();};
00817   
00819   inline const double * getObjCoefficients() const
00820   { return solver_->getObjCoefficients();};
00821   
00823   inline double getObjSense() const
00824   {
00825     //assert (dblParam_[CbcOptimizationDirection]== solver_->getObjSense());
00826     return dblParam_[CbcOptimizationDirection];};
00827   
00829   inline bool isContinuous(int colIndex) const
00830   { return solver_->isContinuous(colIndex);};
00831   
00833   inline bool isBinary(int colIndex) const
00834   { return solver_->isBinary(colIndex);};
00835   
00840   inline bool isInteger(int colIndex) const
00841   { return solver_->isInteger(colIndex);};
00842   
00844   inline bool isIntegerNonBinary(int colIndex) const
00845   { return solver_->isIntegerNonBinary(colIndex);};
00846   
00848   inline bool isFreeBinary(int colIndex) const
00849   { return solver_->isFreeBinary(colIndex) ;};
00850   
00852   inline const CoinPackedMatrix * getMatrixByRow() const
00853   { return solver_->getMatrixByRow();};
00854   
00856   inline const CoinPackedMatrix * getMatrixByCol() const
00857   { return solver_->getMatrixByCol();};
00858   
00860   inline double getInfinity() const
00861   { return solver_->getInfinity();};
00863   inline const double * getCbcColLower() const
00864   { return cbcColLower_;};
00866   inline const double * getCbcColUpper() const
00867   { return cbcColUpper_;};
00869   inline const double * getCbcRowLower() const
00870   { return cbcRowLower_;};
00872   inline const double * getCbcRowUpper() const
00873   { return cbcRowUpper_;};
00875   inline const double * getCbcColSolution() const
00876   { return cbcColSolution_;};
00878   inline const double * getCbcRowPrice() const
00879   { return cbcRowPrice_;};
00881   inline const double * getCbcReducedCost() const
00882   { return cbcReducedCost_;};
00884   inline const double * getCbcRowActivity() const
00885   { return cbcRowActivity_;};
00887   
00888   
00891 
00892   inline double * continuousSolution() const
00893   { return continuousSolution_;};
00898   inline int * usedInSolution() const
00899   { return usedInSolution_;};
00901   void incrementUsed(const double * solution);
00903   void setBestSolution(CBC_Message how,
00904                        double & objectiveValue, const double *solution,
00905                        bool fixVariables=false);
00907   void setBestObjectiveValue( double objectiveValue);
00908 
00915   double checkSolution(double cutoff, double * solution,
00916                        bool fixVariables, double originalObjValue);
00923   bool feasibleSolution(int & numberIntegerInfeasibilities,
00924                         int & numberObjectInfeasibilities) const;
00925 
00931   inline double * currentSolution() const
00932   { return currentSolution_;};
00936   inline const double * testSolution() const
00937   { return testSolution_;};
00938   inline void setTestSolution(const double * solution)
00939   { testSolution_ = solution;};
00941   void reserveCurrentSolution(const double * solution=NULL);
00942 
00944   inline const double * getColSolution() const
00945   { return solver_->getColSolution();};
00946   
00948   inline const double * getRowPrice() const
00949   { return solver_->getRowPrice();};
00950   
00952   inline const double * getReducedCost() const
00953   { return solver_->getReducedCost();};
00954   
00956   inline const double * getRowActivity() const
00957   { return solver_->getRowActivity();};
00958   
00960   inline double getCurrentObjValue() const
00961   { return dblParam_[CbcCurrentObjectiveValue]; }
00963   inline double getCurrentMinimizationObjValue() const
00964   { return dblParam_[CbcCurrentMinimizationObjectiveValue];}
00965   
00967   inline double getMinimizationObjValue() const
00968   { return bestObjective_;};
00970   inline void setMinimizationObjValue(double value) 
00971   { bestObjective_=value;};
00972   
00974   inline double getObjValue() const
00975   { return bestObjective_ * solver_->getObjSense() ; } ;
00981   double getBestPossibleObjValue() const;
00983   inline void setObjValue(double value) 
00984   { bestObjective_=value * solver_->getObjSense() ;};
00985   
00992   inline double * bestSolution() const
00993   { return bestSolution_;};
00994   
00996   inline int getSolutionCount() const
00997   { return numberSolutions_;};
00998   
01000   inline void setSolutionCount(int value) 
01001   { numberSolutions_=value;};
01010   inline int phase() const
01011   { return phase_;};
01012   
01014   inline int getNumberHeuristicSolutions() const { return numberHeuristicSolutions_;};
01015 
01017   inline void setObjSense(double s) { dblParam_[CbcOptimizationDirection]=s;
01018   solver_->setObjSense(s);};
01019 
01021   inline double getContinuousObjective() const
01022   { return originalContinuousObjective_;};
01023   inline void setContinuousObjective(double value)
01024   { originalContinuousObjective_=value;};
01026   inline int getContinuousInfeasibilities() const
01027   { return continuousInfeasibilities_;};
01028   inline void setContinuousInfeasibilities(int value)
01029   { continuousInfeasibilities_=value;};
01031   inline double rootObjectiveAfterCuts() const
01032   { return continuousObjective_;};
01034   inline double sumChangeObjective() const
01035   { return sumChangeObjective1_;};
01038   inline int numberGlobalViolations() const
01039   { return numberGlobalViolations_;};
01040   inline void clearNumberGlobalViolations()
01041   { numberGlobalViolations_=0;};
01043   inline bool resolveAfterTakeOffCuts() const
01044   { return resolveAfterTakeOffCuts_;};
01045   inline void setResolveAfterTakeOffCuts(bool yesNo)
01046   { resolveAfterTakeOffCuts_=yesNo;};
01048 
01051   // Comparison functions (which may be overridden by inheritance)
01052   inline CbcCompareBase * nodeComparison() const
01053   { return nodeCompare_;};
01054   void setNodeComparison(CbcCompareBase * compare);
01055   void setNodeComparison(CbcCompareBase & compare);
01057 
01060   // Feasibility functions (which may be overridden by inheritance)
01061   inline CbcFeasibilityBase * problemFeasibility() const
01062   { return problemFeasibility_;};
01063   void setProblemFeasibility(CbcFeasibilityBase * feasibility);
01064   void setProblemFeasibility(CbcFeasibilityBase & feasibility);
01066 
01069 
01070   inline CbcTree * tree() const
01071   { return tree_;};
01073   void passInTreeHandler(CbcTree & tree);
01077   void passInSubTreeModel(CbcModel & model);
01082   CbcModel * subTreeModel(OsiSolverInterface * solver=NULL) const;
01084   inline int numberStoppedSubTrees() const
01085   { return numberStoppedSubTrees_;}
01087   inline void incrementSubTreeStopped()
01088   { numberStoppedSubTrees_++;};
01094   inline int typePresolve() const
01095   { return presolve_;};
01096   inline void setTypePresolve(int value)
01097   { presolve_=value;};
01099 
01105 
01107   inline CbcBranchDecision * branchingMethod() const
01108   { return branchingMethod_;};
01110   inline void setBranchingMethod(CbcBranchDecision * method)
01111   { branchingMethod_ = method;};
01116   inline void setBranchingMethod(CbcBranchDecision & method)
01117   { branchingMethod_ = &method;};
01119 
01122 
01129   inline int stateOfSearch() const
01130   { return stateOfSearch_;};
01131   inline void setStateOfSearch(int state)
01132   { stateOfSearch_=state;};
01134   inline int searchStrategy() const
01135   { return searchStrategy_;};
01137   inline void setSearchStrategy(int value)
01138   { searchStrategy_ = value; };
01139 
01141   inline int numberCutGenerators() const
01142   { return numberCutGenerators_;};
01144   inline CbcCutGenerator ** cutGenerators() const
01145   { return generator_;};
01147   inline CbcCutGenerator * cutGenerator(int i) const
01148   { return generator_[i];};
01150   inline CbcCutGenerator * virginCutGenerator(int i) const
01151   { return virginGenerator_[i];};
01160   void addCutGenerator(CglCutGenerator * generator,
01161                        int howOften=1, const char * name=NULL,
01162                        bool normal=true, bool atSolution=false, 
01163                        bool infeasible=false,int howOftenInSub=-100,
01164                        int whatDepth=-1, int whatDepthInSub=-1);
01166 
01171 
01173   inline CbcStrategy * strategy() const
01174   { return strategy_;};
01176   void setStrategy(CbcStrategy & strategy);
01178   inline CbcModel * parentModel() const
01179   { return parentModel_;};
01181   inline void setParentModel(CbcModel & parentModel)
01182   { parentModel_ = &parentModel;};
01184 
01185 
01188 
01189   void addHeuristic(CbcHeuristic * generator);
01191   inline CbcHeuristic * heuristic(int i) const
01192   { return heuristic_[i];};
01194   inline int numberHeuristics() const
01195   { return numberHeuristics_;};
01197   inline CbcHeuristic * lastHeuristic() const
01198   { return lastHeuristic_;};
01200   inline void setLastHeuristic(CbcHeuristic * last)
01201   { lastHeuristic_=last;};
01202 
01221   void passInPriorities(const int * priorities, bool ifNotSimpleIntegers);
01222 
01224   inline int priority(int sequence) const
01225   { return object_[sequence]->priority();}; 
01226 
01231   void passInEventHandler(const CbcEventHandler *eventHandler) ;
01232 
01234   inline CbcEventHandler* getEventHandler() const
01235   { return (eventHandler_) ; } ;
01236 
01238     
01248     void setApplicationData (void * appData);
01249 
01251     void * getApplicationData() const;
01264   void passInSolverCharacteristics(OsiBabSolver * solverCharacteristics);
01266   inline const OsiBabSolver * solverCharacteristics() const
01267   { return solverCharacteristics_;};
01269   
01270   //---------------------------------------------------------------------------
01271 
01274 
01275   void passInMessageHandler(CoinMessageHandler * handler);
01277   void newLanguage(CoinMessages::Language language);
01278   inline void setLanguage(CoinMessages::Language language)
01279   {newLanguage(language);};
01281   inline CoinMessageHandler * messageHandler() const
01282   {return handler_;};
01284   inline CoinMessages messages() 
01285   {return messages_;};
01287   inline CoinMessages * messagesPointer() 
01288   {return &messages_;};
01290   void setLogLevel(int value);
01292   inline int logLevel() const
01293   { return handler_->logLevel();};
01295   //---------------------------------------------------------------------------
01297 
01298 
01308 
01309   inline void setSpecialOptions(int value)
01310   { specialOptions_=value;};
01312   inline int specialOptions() const
01313   { return specialOptions_;};
01315   //---------------------------------------------------------------------------
01316 
01318 
01319 
01320     CbcModel(); 
01321     
01323     CbcModel(const OsiSolverInterface &);
01324   
01333     void assignSolver(OsiSolverInterface *&solver,bool deleteSolver=true);
01334   
01338     CbcModel(const CbcModel & rhs, bool noTree=false);
01339   
01341     CbcModel & operator=(const CbcModel& rhs);
01342   
01344      ~CbcModel ();
01345 
01347     inline OsiSolverInterface * solver() const
01348     { return solver_;};
01349 
01351     inline OsiSolverInterface * continuousSolver() const
01352     { return continuousSolver_;};
01353 
01355   inline OsiSolverInterface * referenceSolver() const
01356   { return referenceSolver_;};
01357 
01359   void saveReferenceSolver();
01360 
01366   void resetToReferenceSolver();
01367 
01369   void gutsOfDestructor();
01372   void gutsOfDestructor2();
01374 
01376 
01377 
01378     int getNodeCount2() const
01379     { return numberNodes2_;};
01381   void setPointers(const OsiSolverInterface * solver);
01387   int reducedCostFix() ;
01388 
01395   CoinWarmStartBasis *getEmptyBasis(int ns = 0, int na = 0) const ;
01396 
01406   void takeOffCuts(OsiCuts &cuts, 
01407                      bool allowResolve,OsiCuts * saveCuts) ;
01408 
01422   int addCuts(CbcNode * node, CoinWarmStartBasis *&lastws,bool canFix);
01423 
01438   void addCuts1(CbcNode * node, CoinWarmStartBasis *&lastws);
01443   void setObjectiveValue(CbcNode * thisNode, const CbcNode * parentNode) const;
01444 
01448   void convertToDynamic();
01450   int cliquePseudoCosts(int doStatistics);
01452   void pseudoShadow(double * down, double * up);
01453 
01455   inline const double * hotstartSolution() const
01456   { return hotstartSolution_;};
01458   inline const int * hotstartPriorities() const
01459   { return hotstartPriorities_;};
01460 
01462   inline CbcCountRowCut ** addedCuts() const
01463   { return addedCuts_;};
01465   inline int currentNumberCuts() const
01466   { return currentNumberCuts_;};
01468   inline OsiCuts * globalCuts() 
01469   { return &globalCuts_;};
01471   void setNextRowCut(const OsiRowCut & cut);
01473   inline CbcNode * currentNode() const
01474   { return currentNode_;};
01476   inline void setNumberStrongIterations(int number)
01477   { numberStrongIterations_ = number;};
01479   inline int numberStrongIterations() const
01480   { return numberStrongIterations_;};
01482   void incrementStrongInfo(int numberTimes, int numberIterations,
01483                            int numberFixed, bool ifInfeasible);
01485   void generateCpp( FILE * fp,int options);
01487 
01488 //---------------------------------------------------------------------------
01489 
01490 private:
01492 
01493 
01495   OsiSolverInterface * solver_;
01496 
01503   bool ourSolver_ ;
01504 
01506   OsiSolverInterface * continuousSolver_;
01507 
01509   OsiSolverInterface * referenceSolver_;
01510 
01512   CoinMessageHandler * handler_;
01513 
01519   bool defaultHandler_;
01520 
01522   CoinMessages messages_;
01523 
01525   int intParam_[CbcLastIntParam];
01526 
01528   double dblParam_[CbcLastDblParam];
01529 
01538   mutable CoinWarmStart *emptyWarmStart_ ;
01539 
01541   double bestObjective_;
01543   double bestPossibleObjective_;
01545   double sumChangeObjective1_;
01547   double sumChangeObjective2_;
01548 
01550   double * bestSolution_;
01551 
01556   double * currentSolution_;
01560   mutable const double * testSolution_;
01562   OsiCuts globalCuts_;
01563 
01565   double minimumDrop_;
01567   int numberSolutions_;
01574   int stateOfSearch_;
01576   double * hotstartSolution_;
01578   int * hotstartPriorities_;
01580   int numberHeuristicSolutions_;
01582   int numberNodes_;
01586   int numberNodes2_;
01588   int numberIterations_;
01590   int status_;
01601   int secondaryStatus_;
01603   int numberIntegers_;
01605   int numberRowsAtContinuous_;
01607   int maximumNumberCuts_;
01616   int phase_;
01617 
01619   int currentNumberCuts_;
01620 
01625   int maximumDepth_;
01631   CbcNodeInfo ** walkback_;
01632 
01640   CbcCountRowCut ** addedCuts_;
01641 
01645   OsiRowCut * nextRowCut_;
01646 
01648   CbcNode * currentNode_;
01649 
01651   int * integerVariable_;
01653   char * integerInfo_;
01655   double * continuousSolution_;
01657   int * usedInSolution_;
01664   int specialOptions_;
01666   CbcCompareBase * nodeCompare_;
01668   CbcFeasibilityBase * problemFeasibility_;
01670   CbcTree * tree_;
01672   CbcModel * subTreeModel_;
01674   int numberStoppedSubTrees_;
01676   CbcBranchDecision * branchingMethod_;
01678   CbcStrategy * strategy_;
01680   CbcModel * parentModel_;
01686 
01687   const double * cbcColLower_;
01689   const double * cbcColUpper_;
01691   const double * cbcRowLower_;
01693   const double * cbcRowUpper_;
01695   const double * cbcColSolution_;
01697   const double * cbcRowPrice_;
01699   const double * cbcReducedCost_;
01701   const double * cbcRowActivity_;
01703   void * appData_;
01705   int presolve_;
01709   int numberStrong_;
01712   int numberBeforeTrust_;
01715   int numberPenalties_;
01718   double penaltyScaleFactor_;
01720   int numberAnalyzeIterations_;
01722   double * analyzeResults_;
01724   int numberInfeasibleNodes_;
01731   int problemType_;
01733   int printFrequency_;
01735   int numberCutGenerators_;
01736   // Cut generators
01737   CbcCutGenerator ** generator_;
01738   // Cut generators before any changes
01739   CbcCutGenerator ** virginGenerator_;
01741   int numberHeuristics_;
01743   CbcHeuristic ** heuristic_;
01745   CbcHeuristic * lastHeuristic_;
01747 # ifdef CBC_ONLY_CLP
01748   ClpEventHandler *eventHandler_ ;
01749 # else
01750   CbcEventHandler *eventHandler_ ;
01751 # endif
01752 
01754   int numberObjects_;
01755 
01766   CbcObject ** object_;
01767 
01768   
01770   int * originalColumns_;
01772   int howOftenGlobalScan_;
01775   int numberGlobalViolations_;
01779   double continuousObjective_;
01782   double originalContinuousObjective_;
01784   int continuousInfeasibilities_;
01786   int maximumCutPassesAtRoot_;
01788   int maximumCutPasses_;
01790   int currentPassNumber_;
01792   int maximumWhich_;
01794   int * whichGenerator_;
01796   int maximumStatistics_;
01798   CbcStatistics ** statistics_;
01800   int numberFixedAtRoot_;
01802   int numberFixedNow_;
01804   bool stoppedOnGap_;
01806   bool eventHappened_;
01808   int numberLongStrong_;
01810   int numberOldActiveCuts_;
01812   int numberNewCuts_;
01814   int sizeMiniTree_;
01816   int searchStrategy_;
01818   int numberStrongIterations_;
01820   int strongInfo_[3];
01827   OsiBabSolver * solverCharacteristics_;
01829   bool resolveAfterTakeOffCuts_;
01831 };
01832 
01833 #endif

Generated on Thu May 15 22:04:41 2008 by  doxygen 1.4.7