00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef RobotSetup_H
00012 #define RobotSetup_H
00013 #include "BonBonminSetup.hpp"
00014 #include "BonAmplSetup.hpp"
00015 namespace Bonmin
00016 {
00018 class RobotSetup : public BonminSetup
00019 {
00020 public:
00022 RobotSetup(const CoinMessageHandler * handler = NULL);
00024 RobotSetup(const RobotSetup & other);
00025
00027 RobotSetup(const RobotSetup &setup,
00028 OsiTMINLPInterface &nlp);
00029
00031 RobotSetup(const RobotSetup &setup,
00032 OsiTMINLPInterface &nlp,
00033 const std::string & prefix);
00035 virtual BonminSetup * clone() const
00036 {
00037 return new RobotSetup(*this);
00038 }
00040
00041
00042
00044 RobotSetup *clone(OsiTMINLPInterface&nlp)const{
00045 return new RobotSetup(*this, nlp);
00046 }
00048 RobotSetup *clone(OsiTMINLPInterface &nlp, const std::string & prefix)const{
00049 return new RobotSetup(*this, nlp, prefix);
00050 }
00051 virtual ~RobotSetup()
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
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 addNWays();
00082 void initializeRobot();
00083 };
00084 }
00086 #endif
00087