Bonmin  1.7
BonCbcNlpStrategy.hpp
Go to the documentation of this file.
00001 // (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors :
00006 // John J. Forrest, International Business Machines Corporation
00007 // Pierre Bonami, Carnegie Mellon University,
00008 //
00009 // Date : 03/15/2006
00010 
00011 #ifndef BonCbcNlpStrategy_H
00012 #define BonCbcNlpStrategy_H
00013 
00014 #include "CbcStrategy.hpp"
00015 class CglPreProcess;
00016 class CbcNodeInfo;
00017 class CbcNode;
00018 class CoinWarmStartDiff;
00019 
00020 
00021 namespace Bonmin
00022 {
00023   class CbcNlpStrategy : public CbcStrategy
00024   {
00025   public:
00026 
00027     // Default Constructor
00028     CbcNlpStrategy (int maxFailures,
00029         int maxInfeasibles,
00030         int pretendFailIsInfeasible);
00031 
00032     // Copy constructor
00033     CbcNlpStrategy ( const CbcNlpStrategy &);
00034 
00035     // Destructor
00036     virtual ~CbcNlpStrategy ();
00037 
00039     virtual CbcStrategy * clone() const;
00040 
00042     virtual CbcNodeInfo * fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const;
00044     virtual CbcNodeInfo * partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
00045         int numberChangedBounds,const int * variables,
00046         const double * boundChanges,
00047         const CoinWarmStartDiff *basisDiff) const;
00054     virtual int status(CbcModel * model, CbcNodeInfo * parent, int whereFrom);
00056     inline void setMaxFailure(int value)
00057     {
00058       maxFailure_ = value;
00059     }
00061     inline void setMaxInfeasible(int value)
00062     {
00063       maxInfeasible_ = value;
00064     }
00065 
00067     virtual void setupCutGenerators(CbcModel & model);
00069     virtual void setupHeuristics(CbcModel & model);
00071     virtual void setupPrinting(CbcModel & model,int modelLogLevel);
00073     virtual void setupOther(CbcModel & model);
00074 
00075     bool hasFailed()
00076     {
00077       return hasFailed_;
00078     }
00079   protected:
00080     // Data
00082     bool hasFailed_;
00084     int maxFailure_;
00086     int maxInfeasible_;
00089     int pretendFailIsInfeasible_;
00090 
00091   private:
00093     CbcNlpStrategy & operator=(const CbcNlpStrategy& rhs);
00094 
00095   };
00096 }
00097 
00098 #endif