/home/coin/SVN-release/OS-2.0.1/Couenne/src/main/BonCouenneSetup.hpp

Go to the documentation of this file.
00001 /* $Id: BonCouenneSetup.hpp 154 2009-06-16 18:52:53Z pbelotti $ */
00002 // (C) Copyright International Business Machines Corporation 2007
00003 // All Rights Reserved.
00004 // This code is published under the Common Public License.
00005 //
00006 // Authors :
00007 // Pierre Bonami, International Business Machines Corporation
00008 //
00009 // Date : 04/18/2007
00010 #ifndef BonCouenneSetup_H
00011 #define BonCouenneSetup_H
00012 #include "BonBabSetupBase.hpp"
00013 #include "CbcFeasibilityBase.hpp"
00014 
00015 struct ASL;
00016 
00017 class CouenneCutGenerator;
00018 class CouenneProblem;
00019 
00020 namespace Bonmin{
00021 
00022   class CouenneInterface;
00023 
00024   class SmartAsl : public Ipopt::ReferencedObject{
00025 public:
00026     ASL * asl;
00027     SmartAsl():
00028       Ipopt::ReferencedObject(),
00029       asl(NULL)
00030     {}
00031     virtual ~SmartAsl();
00032   };
00033   
00034   class CouenneSetup : public BabSetupBase{
00035 public:
00037     CouenneSetup():
00038     BabSetupBase(),
00039     aslfg_(NULL),
00040     CouennePtr_ (NULL),
00041     displayStats_ (false) {}
00042 
00044     CouenneSetup(const CouenneSetup& other):
00045       BabSetupBase(other),
00046       aslfg_(NULL),
00047       displayStats_ (other.displayStats_) {}
00048     
00050     virtual BabSetupBase * clone() const{
00051       return new CouenneSetup(*this);
00052     }
00053     
00055     virtual ~CouenneSetup();
00056 
00058     bool InitializeCouenne(char **& argv, 
00059                            CouenneProblem *couenneProb = NULL, 
00060                            CouenneInterface *ci = NULL);
00061 
00063     virtual void registerOptions();
00065     static void registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
00066     
00068     virtual void readOptionsFile(){
00069       if (readOptions_) return;
00070       BabSetupBase::readOptionsFile("couenne.opt");
00071     }
00072 
00074     CouenneCutGenerator *couennePtr () const
00075     {return CouennePtr_;}
00076 
00078     bool displayStats () 
00079     {return displayStats_;}
00080 
00082     void addMilpCutGenerators ();
00083 
00085     inline void setDoubleParameter (const DoubleParameter &p, const double val)
00086     {doubleParam_ [p] = val;}
00087 
00089     inline double getDoubleParameter (const DoubleParameter &p) const
00090     {return doubleParam_ [p];}
00091 
00092 private:
00093       SmartPtr<SmartAsl> aslfg_;
00094 
00099     CouenneCutGenerator *CouennePtr_;
00100 
00102     bool displayStats_;
00103   };
00104 }
00105 
00106 #endif

Generated on Thu Oct 8 03:02:57 2009 by  doxygen 1.4.7