/home/coin/SVN-release/Cbc-1.1.1/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 isNodeLimitReached() const;
00674     bool isSecondsLimitReached() const;
00676     bool isSolutionLimitReached() const;
00678     inline int getIterationCount() const
00679     { return numberIterations_;};
00681     inline int getNodeCount() const
00682     { return numberNodes_;};
00692     inline int status() const
00693     { return status_;};
00704     inline int secondaryStatus() const
00705     { return secondaryStatus_;};
00707     bool isInitialSolveAbandoned() const ;
00709     bool isInitialSolveProvenOptimal() const ;
00711     bool isInitialSolveProvenPrimalInfeasible() const ;
00713     bool isInitialSolveProvenDualInfeasible() const ;
00714 
00716 
00717   //---------------------------------------------------------------------------
00730 
00731   inline int numberRowsAtContinuous() const
00732   { return numberRowsAtContinuous_;};
00733 
00735   inline int getNumCols() const
00736   { return solver_->getNumCols();};
00737   
00739   inline int getNumRows() const
00740   { return solver_->getNumRows();};
00741   
00743   inline CoinBigIndex getNumElements() const
00744   { return solver_->getNumElements();};
00745 
00747   inline int numberIntegers() const
00748   { return numberIntegers_;};
00749   // Integer variables
00750   inline const int * integerVariable() const 
00751   { return integerVariable_;};
00753   inline const char integerType(int i) const
00754   { return integerInfo_[i];};
00756   inline const char * integerType() const
00757   { return integerInfo_;};
00758 
00760   inline const double * getColLower() const
00761   { return solver_->getColLower();};
00762   
00764   inline const double * getColUpper() const
00765   { return solver_->getColUpper();};
00766   
00776   inline const char * getRowSense() const
00777   { return solver_->getRowSense();};
00778   
00787   inline const double * getRightHandSide() const
00788   { return solver_->getRightHandSide();};
00789   
00798   inline const double * getRowRange() const
00799   { return solver_->getRowRange();};
00800   
00802   inline const double * getRowLower() const
00803   { return solver_->getRowLower();};
00804   
00806   inline const double * getRowUpper() const
00807   { return solver_->getRowUpper();};
00808   
00810   inline const double * getObjCoefficients() const
00811   { return solver_->getObjCoefficients();};
00812   
00814   inline double getObjSense() const
00815   {
00816     //assert (dblParam_[CbcOptimizationDirection]== solver_->getObjSense());
00817     return dblParam_[CbcOptimizationDirection];};
00818   
00820   inline bool isContinuous(int colIndex) const
00821   { return solver_->isContinuous(colIndex);};
00822   
00824   inline bool isBinary(int colIndex) const
00825   { return solver_->isBinary(colIndex);};
00826   
00831   inline bool isInteger(int colIndex) const
00832   { return solver_->isInteger(colIndex);};
00833   
00835   inline bool isIntegerNonBinary(int colIndex) const
00836   { return solver_->isIntegerNonBinary(colIndex);};
00837   
00839   inline bool isFreeBinary(int colIndex) const
00840   { return solver_->isFreeBinary(colIndex) ;};
00841   
00843   inline const CoinPackedMatrix * getMatrixByRow() const
00844   { return solver_->getMatrixByRow();};
00845   
00847   inline const CoinPackedMatrix * getMatrixByCol() const
00848   { return solver_->getMatrixByCol();};
00849   
00851   inline double getInfinity() const
00852   { return solver_->getInfinity();};
00854   inline const double * getCbcColLower() const
00855   { return cbcColLower_;};
00857   inline const double * getCbcColUpper() const
00858   { return cbcColUpper_;};
00860   inline const double * getCbcRowLower() const
00861   { return cbcRowLower_;};
00863   inline const double * getCbcRowUpper() const
00864   { return cbcRowUpper_;};
00866   inline const double * getCbcColSolution() const
00867   { return cbcColSolution_;};
00869   inline const double * getCbcRowPrice() const
00870   { return cbcRowPrice_;};
00872   inline const double * getCbcReducedCost() const
00873   { return cbcReducedCost_;};
00875   inline const double * getCbcRowActivity() const
00876   { return cbcRowActivity_;};
00878   
00879   
00882 
00883   inline double * continuousSolution() const
00884   { return continuousSolution_;};
00889   inline int * usedInSolution() const
00890   { return usedInSolution_;};
00892   void incrementUsed(const double * solution);
00894   void setBestSolution(CBC_Message how,
00895                        double & objectiveValue, const double *solution,
00896                        bool fixVariables=false);
00898   void setBestObjectiveValue( double objectiveValue);
00899 
00906   double checkSolution(double cutoff, const double * solution,
00907                        bool fixVariables, double originalObjValue);
00914   bool feasibleSolution(int & numberIntegerInfeasibilities,
00915                         int & numberObjectInfeasibilities) const;
00916 
00922   inline double * currentSolution() const
00923   { return currentSolution_;};
00927   inline const double * testSolution() const
00928   { return testSolution_;};
00929   inline void setTestSolution(const double * solution)
00930   { testSolution_ = solution;};
00932   void reserveCurrentSolution(const double * solution=NULL);
00933 
00935   inline const double * getColSolution() const
00936   { return solver_->getColSolution();};
00937   
00939   inline const double * getRowPrice() const
00940   { return solver_->getRowPrice();};
00941   
00943   inline const double * getReducedCost() const
00944   { return solver_->getReducedCost();};
00945   
00947   inline const double * getRowActivity() const
00948   { return solver_->getRowActivity();};
00949   
00951   inline double getCurrentObjValue() const
00952   { return dblParam_[CbcCurrentObjectiveValue]; }
00954   inline double getCurrentMinimizationObjValue() const
00955   { return dblParam_[CbcCurrentMinimizationObjectiveValue];}
00956   
00958   inline double getMinimizationObjValue() const
00959   { return bestObjective_;};
00961   inline void setMinimizationObjValue(double value) 
00962   { bestObjective_=value;};
00963   
00965   inline double getObjValue() const
00966   { return bestObjective_ * solver_->getObjSense() ; } ;
00972   double getBestPossibleObjValue() const;
00974   inline void setObjValue(double value) 
00975   { bestObjective_=value * solver_->getObjSense() ;};
00976   
00983   inline double * bestSolution() const
00984   { return bestSolution_;};
00985   
00987   inline int getSolutionCount() const
00988   { return numberSolutions_;};
00989   
00991   inline void setSolutionCount(int value) 
00992   { numberSolutions_=value;};
01001   inline int phase() const
01002   { return phase_;};
01003   
01005   inline int getNumberHeuristicSolutions() const { return numberHeuristicSolutions_;};
01006 
01008   inline void setObjSense(double s) { dblParam_[CbcOptimizationDirection]=s;
01009   solver_->setObjSense(s);};
01010 
01012   inline double getContinuousObjective() const
01013   { return originalContinuousObjective_;};
01014   inline void setContinuousObjective(double value)
01015   { originalContinuousObjective_=value;};
01017   inline int getContinuousInfeasibilities() const
01018   { return continuousInfeasibilities_;};
01019   inline void setContinuousInfeasibilities(int value)
01020   { continuousInfeasibilities_=value;};
01022   inline double rootObjectiveAfterCuts() const
01023   { return continuousObjective_;};
01025   inline double sumChangeObjective() const
01026   { return sumChangeObjective1_;};
01029   inline int numberGlobalViolations() const
01030   { return numberGlobalViolations_;};
01031   inline void clearNumberGlobalViolations()
01032   { numberGlobalViolations_=0;};
01034   inline bool resolveAfterTakeOffCuts() const
01035   { return resolveAfterTakeOffCuts_;};
01036   inline void setResolveAfterTakeOffCuts(bool yesNo)
01037   { resolveAfterTakeOffCuts_=yesNo;};
01039 
01042   // Comparison functions (which may be overridden by inheritance)
01043   inline CbcCompareBase * nodeComparison() const
01044   { return nodeCompare_;};
01045   void setNodeComparison(CbcCompareBase * compare);
01046   void setNodeComparison(CbcCompareBase & compare);
01048 
01051   // Feasibility functions (which may be overridden by inheritance)
01052   inline CbcFeasibilityBase * problemFeasibility() const
01053   { return problemFeasibility_;};
01054   void setProblemFeasibility(CbcFeasibilityBase * feasibility);
01055   void setProblemFeasibility(CbcFeasibilityBase & feasibility);
01057 
01060 
01061   inline CbcTree * tree() const
01062   { return tree_;};
01064   void passInTreeHandler(CbcTree & tree);
01068   void passInSubTreeModel(CbcModel & model);
01073   CbcModel * subTreeModel(OsiSolverInterface * solver=NULL) const;
01075   inline int numberStoppedSubTrees() const
01076   { return numberStoppedSubTrees_;}
01078   inline void incrementSubTreeStopped()
01079   { numberStoppedSubTrees_++;};
01085   inline int typePresolve() const
01086   { return presolve_;};
01087   inline void setTypePresolve(int value)
01088   { presolve_=value;};
01090 
01096 
01098   inline CbcBranchDecision * branchingMethod() const
01099   { return branchingMethod_;};
01101   inline void setBranchingMethod(CbcBranchDecision * method)
01102   { branchingMethod_ = method;};
01107   inline void setBranchingMethod(CbcBranchDecision & method)
01108   { branchingMethod_ = &method;};
01110 
01113 
01120   inline int stateOfSearch() const
01121   { return stateOfSearch_;};
01122   inline void setStateOfSearch(int state)
01123   { stateOfSearch_=state;};
01125   inline int searchStrategy() const
01126   { return searchStrategy_;};
01128   inline void setSearchStrategy(int value)
01129   { searchStrategy_ = value; };
01130 
01132   inline int numberCutGenerators() const
01133   { return numberCutGenerators_;};
01135   inline CbcCutGenerator ** cutGenerators() const
01136   { return generator_;};
01138   inline CbcCutGenerator * cutGenerator(int i) const
01139   { return generator_[i];};
01141   inline CbcCutGenerator * virginCutGenerator(int i) const
01142   { return virginGenerator_[i];};
01151   void addCutGenerator(CglCutGenerator * generator,
01152                        int howOften=1, const char * name=NULL,
01153                        bool normal=true, bool atSolution=false, 
01154                        bool infeasible=false,int howOftenInSub=-100,
01155                        int whatDepth=-1, int whatDepthInSub=-1);
01157 
01162 
01164   inline CbcStrategy * strategy() const
01165   { return strategy_;};
01167   void setStrategy(CbcStrategy & strategy);
01169   inline CbcModel * parentModel() const
01170   { return parentModel_;};
01172   inline void setParentModel(CbcModel & parentModel)
01173   { parentModel_ = &parentModel;};
01175 
01176 
01179 
01180   void addHeuristic(CbcHeuristic * generator);
01182   inline CbcHeuristic * heuristic(int i) const
01183   { return heuristic_[i];};
01185   inline int numberHeuristics() const
01186   { return numberHeuristics_;};
01188   inline CbcHeuristic * lastHeuristic() const
01189   { return lastHeuristic_;};
01191   inline void setLastHeuristic(CbcHeuristic * last)
01192   { lastHeuristic_=last;};
01193 
01212   void passInPriorities(const int * priorities, bool ifNotSimpleIntegers);
01213 
01215   inline int priority(int sequence) const
01216   { return object_[sequence]->priority();}; 
01217 
01222   void passInEventHandler(const CbcEventHandler *eventHandler) ;
01223 
01225   inline CbcEventHandler* getEventHandler() const
01226   { return (eventHandler_) ; } ;
01227 
01229     
01239     void setApplicationData (void * appData);
01240 
01242     void * getApplicationData() const;
01255   void passInSolverCharacteristics(OsiBabSolver * solverCharacteristics);
01257   inline const OsiBabSolver * solverCharacteristics() const
01258   { return solverCharacteristics_;};
01260   
01261   //---------------------------------------------------------------------------
01262 
01265 
01266   void passInMessageHandler(CoinMessageHandler * handler);
01268   void newLanguage(CoinMessages::Language language);
01269   inline void setLanguage(CoinMessages::Language language)
01270   {newLanguage(language);};
01272   inline CoinMessageHandler * messageHandler() const
01273   {return handler_;};
01275   inline CoinMessages messages() 
01276   {return messages_;};
01278   inline CoinMessages * messagesPointer() 
01279   {return &messages_;};
01281   void setLogLevel(int value);
01283   inline int logLevel() const
01284   { return handler_->logLevel();};
01286   //---------------------------------------------------------------------------
01288 
01289 
01299 
01300   inline void setSpecialOptions(int value)
01301   { specialOptions_=value;};
01303   inline int specialOptions() const
01304   { return specialOptions_;};
01306   //---------------------------------------------------------------------------
01307 
01309 
01310 
01311     CbcModel(); 
01312     
01314     CbcModel(const OsiSolverInterface &);
01315   
01324     void assignSolver(OsiSolverInterface *&solver,bool deleteSolver=true);
01325   
01329     CbcModel(const CbcModel & rhs, bool noTree=false);
01330   
01332     CbcModel & operator=(const CbcModel& rhs);
01333   
01335      ~CbcModel ();
01336 
01338     inline OsiSolverInterface * solver() const
01339     { return solver_;};
01340 
01342     inline OsiSolverInterface * continuousSolver() const
01343     { return continuousSolver_;};
01344 
01346   inline OsiSolverInterface * referenceSolver() const
01347   { return referenceSolver_;};
01348 
01350   void saveReferenceSolver();
01351 
01357   void resetToReferenceSolver();
01358 
01360   void gutsOfDestructor();
01363   void gutsOfDestructor2();
01365 
01367 
01368 
01369     int getNodeCount2() const
01370     { return numberNodes2_;};
01372   void setPointers(const OsiSolverInterface * solver);
01378   int reducedCostFix() ;
01379 
01386   CoinWarmStartBasis *getEmptyBasis(int ns = 0, int na = 0) const ;
01387 
01397   void takeOffCuts(OsiCuts &cuts, 
01398                      bool allowResolve,OsiCuts * saveCuts) ;
01399 
01413   int addCuts(CbcNode * node, CoinWarmStartBasis *&lastws,bool canFix);
01414 
01429   void addCuts1(CbcNode * node, CoinWarmStartBasis *&lastws);
01434   void setObjectiveValue(CbcNode * thisNode, const CbcNode * parentNode) const;
01435 
01439   void convertToDynamic();
01441   int cliquePseudoCosts(int doStatistics);
01443   void pseudoShadow(double * down, double * up);
01444 
01446   inline const double * hotstartSolution() const
01447   { return hotstartSolution_;};
01449   inline const int * hotstartPriorities() const
01450   { return hotstartPriorities_;};
01451 
01453   inline CbcCountRowCut ** addedCuts() const
01454   { return addedCuts_;};
01456   inline int currentNumberCuts() const
01457   { return currentNumberCuts_;};
01459   inline OsiCuts * globalCuts() 
01460   { return &globalCuts_;};
01462   void setNextRowCut(const OsiRowCut & cut);
01464   inline CbcNode * currentNode() const
01465   { return currentNode_;};
01467   inline void setNumberStrongIterations(int number)
01468   { numberStrongIterations_ = number;};
01470   inline int numberStrongIterations() const
01471   { return numberStrongIterations_;};
01473   void incrementStrongInfo(int numberTimes, int numberIterations,
01474                            int numberFixed, bool ifInfeasible);
01476   void generateCpp( FILE * fp,int options);
01478 
01479 //---------------------------------------------------------------------------
01480 
01481 private:
01483 
01484 
01486   OsiSolverInterface * solver_;
01487 
01494   bool ourSolver_ ;
01495 
01497   OsiSolverInterface * continuousSolver_;
01498 
01500   OsiSolverInterface * referenceSolver_;
01501 
01503   CoinMessageHandler * handler_;
01504 
01510   bool defaultHandler_;
01511 
01513   CoinMessages messages_;
01514 
01516   int intParam_[CbcLastIntParam];
01517 
01519   double dblParam_[CbcLastDblParam];
01520 
01529   mutable CoinWarmStart *emptyWarmStart_ ;
01530 
01532   double bestObjective_;
01534   double bestPossibleObjective_;
01536   double sumChangeObjective1_;
01538   double sumChangeObjective2_;
01539 
01541   double * bestSolution_;
01542 
01547   double * currentSolution_;
01551   mutable const double * testSolution_;
01553   OsiCuts globalCuts_;
01554 
01556   double minimumDrop_;
01558   int numberSolutions_;
01565   int stateOfSearch_;
01567   double * hotstartSolution_;
01569   int * hotstartPriorities_;
01571   int numberHeuristicSolutions_;
01573   int numberNodes_;
01577   int numberNodes2_;
01579   int numberIterations_;
01581   int status_;
01592   int secondaryStatus_;
01594   int numberIntegers_;
01596   int numberRowsAtContinuous_;
01598   int maximumNumberCuts_;
01607   int phase_;
01608 
01610   int currentNumberCuts_;
01611 
01616   int maximumDepth_;
01622   CbcNodeInfo ** walkback_;
01623 
01631   CbcCountRowCut ** addedCuts_;
01632 
01636   OsiRowCut * nextRowCut_;
01637 
01639   CbcNode * currentNode_;
01640 
01642   int * integerVariable_;
01644   char * integerInfo_;
01646   double * continuousSolution_;
01648   int * usedInSolution_;
01655   int specialOptions_;
01657   CbcCompareBase * nodeCompare_;
01659   CbcFeasibilityBase * problemFeasibility_;
01661   CbcTree * tree_;
01663   CbcModel * subTreeModel_;
01665   int numberStoppedSubTrees_;
01667   CbcBranchDecision * branchingMethod_;
01669   CbcStrategy * strategy_;
01671   CbcModel * parentModel_;
01677 
01678   const double * cbcColLower_;
01680   const double * cbcColUpper_;
01682   const double * cbcRowLower_;
01684   const double * cbcRowUpper_;
01686   const double * cbcColSolution_;
01688   const double * cbcRowPrice_;
01690   const double * cbcReducedCost_;
01692   const double * cbcRowActivity_;
01694   void * appData_;
01696   int presolve_;
01700   int numberStrong_;
01703   int numberBeforeTrust_;
01706   int numberPenalties_;
01709   double penaltyScaleFactor_;
01711   int numberAnalyzeIterations_;
01713   double * analyzeResults_;
01715   int numberInfeasibleNodes_;
01722   int problemType_;
01724   int printFrequency_;
01726   int numberCutGenerators_;
01727   // Cut generators
01728   CbcCutGenerator ** generator_;
01729   // Cut generators before any changes
01730   CbcCutGenerator ** virginGenerator_;
01732   int numberHeuristics_;
01734   CbcHeuristic ** heuristic_;
01736   CbcHeuristic * lastHeuristic_;
01738 # ifdef CBC_ONLY_CLP
01739   ClpEventHandler *eventHandler_ ;
01740 # else
01741   CbcEventHandler *eventHandler_ ;
01742 # endif
01743 
01745   int numberObjects_;
01746 
01757   CbcObject ** object_;
01758 
01759   
01761   int * originalColumns_;
01763   int howOftenGlobalScan_;
01766   int numberGlobalViolations_;
01770   double continuousObjective_;
01773   double originalContinuousObjective_;
01775   int continuousInfeasibilities_;
01777   int maximumCutPassesAtRoot_;
01779   int maximumCutPasses_;
01781   int currentPassNumber_;
01783   int maximumWhich_;
01785   int * whichGenerator_;
01787   int maximumStatistics_;
01789   CbcStatistics ** statistics_;
01791   int numberFixedAtRoot_;
01793   int numberFixedNow_;
01795   bool stoppedOnGap_;
01797   bool eventHappened_;
01799   int numberLongStrong_;
01801   int numberOldActiveCuts_;
01803   int numberNewCuts_;
01805   int sizeMiniTree_;
01807   int searchStrategy_;
01809   int numberStrongIterations_;
01811   int strongInfo_[3];
01818   OsiBabSolver * solverCharacteristics_;
01820   bool resolveAfterTakeOffCuts_;
01822 };
01823 
01824 #endif

Generated on Thu May 15 21:59:04 2008 by  doxygen 1.4.7