/home/coin/SVN-release/OS-2.4.0/Bonmin/experimental/Separable/SepaSetup.hpp

Go to the documentation of this file.
00001 // (C) Copyright CNRS and others 2010
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors :
00006 // Pierre Bonami, Université de la Méditérannée
00007 // Hassan Hijazi, Orange Labs
00008 //
00009 // Date : 05/22/2010
00010 
00011 #ifndef SepaSetup_H
00012 #define SepaSetup_H
00013 #include "BonBonminSetup.hpp"
00014 #include "BonAmplSetup.hpp"
00015 namespace Bonmin
00016 {
00018   class SepaSetup : public BonminSetup
00019   {
00020   public:
00022     SepaSetup(const CoinMessageHandler * handler = NULL);
00024     SepaSetup(const SepaSetup & other);
00025 
00027     SepaSetup(const SepaSetup &setup,
00028                 OsiTMINLPInterface &nlp);
00029 
00031     SepaSetup(const SepaSetup &setup,
00032                 OsiTMINLPInterface &nlp,
00033                 const std::string & prefix);
00035     virtual BabSetupBase * clone() const
00036     {
00037       return new SepaSetup(*this);
00038     }
00040     //    virtual BabSetupBase *clone(OsiTMINLPInterface&nlp)const{
00041     //      return new SepaSetup(*this, nlp);
00042     //    }
00044     SepaSetup *clone(OsiTMINLPInterface&nlp)const{
00045       return new SepaSetup(*this, nlp);
00046     }
00048     SepaSetup *clone(OsiTMINLPInterface &nlp, const std::string & prefix)const{
00049       return new SepaSetup(*this, nlp, prefix);
00050     }
00051     virtual ~SepaSetup()
00052     {}
00056     virtual void registerOptions();
00059     static void registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
00061     void initialize(Ipopt::SmartPtr<TMINLP> tminlp, bool createContinuousSolver = true);
00063     void initialize(const OsiTMINLPInterface& nlpSi, bool createContinuousSolver = true);
00064 
00066 void initialize(char **& argv)
00067   {
00068     readOptionsFile();
00069     /* Read the model.*/
00070     Ipopt::SmartPtr<AmplTMINLP> model = new AmplTMINLP(ConstPtr(journalist()), roptions(), options(),
00071                                                 argv, NULL, "bonmin", NULL);
00072     mayPrintDoc();
00073     initialize(Ipopt::GetRawPtr(model), true);
00074   }
00075 
00076 
00077 
00078   protected:
00080     void initializeSepa();
00081   };
00082 }
00084 #endif
00085 

Generated on Thu Sep 22 03:05:53 2011 by  doxygen 1.4.7