Bonmin 1.8.9
Loading...
Searching...
No Matches
BonBonminSetup.hpp
Go to the documentation of this file.
1// (C) Copyright International Business Machines Corporation 2007
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors :
6// Pierre Bonami, International Business Machines Corporation
7//
8// Date : 04/13/2007
9#ifndef BonminSetup_H
10#define BonminSetup_H
11#include "BonBabSetupBase.hpp"
12namespace Bonmin
13{
24 /* Bonmin algorithm setup. */
26 {
27 public:
29 BonminSetup(const CoinMessageHandler * handler = NULL);
31 BonminSetup(const BonminSetup & other);
32
36
40 const std::string & prefix);
42 virtual BabSetupBase * clone() const
43 {
44 return new BonminSetup(*this);
45 }
47 // virtual BabSetupBase *clone(OsiTMINLPInterface&nlp)const{
48 // return new BonminSetup(*this, nlp);
49 // }
52 return new BonminSetup(*this, nlp);
53 }
55 BonminSetup *clone(OsiTMINLPInterface &nlp, const std::string & prefix)const{
56 return new BonminSetup(*this, nlp, prefix);
57 }
58 virtual ~BonminSetup()
59 {}
63 virtual void registerOptions();
71 void initialize(Ipopt::SmartPtr<TMINLP> tminlp, bool createContinuousSolver = true);
73 void initialize(const OsiTMINLPInterface& nlpSi, bool createContinuousSolver = true);
76
80 protected:
88 void initializeBHyb(bool createContinuousSolver = false);
89 private:
90 Algorithm algo_;
91 };
92}
94#endif
95
A class to have all elements necessary to setup a branch-and-bound.
void addCutGenerator(CuttingMethod &cg)
const char * prefix() const
Get prefix to use for options.
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions()
Access registered Options.
void addMilpCutGenerators()
Add milp cut generators according to options.
virtual BabSetupBase * clone() const
virtual copy constructor.
Bonmin::Algorithm getAlgorithm()
Get the algorithm used.
void initializeBHyb(bool createContinuousSolver=false)
Initialize a branch-and-cut with some OA.
void initialize(Ipopt::SmartPtr< TMINLP > tminlp, bool createContinuousSolver=true)
Initialize, read options and create appropriate bonmin setup.
void addCutGenerator(CuttingMethod &cg)
BonminSetup * clone(OsiTMINLPInterface &nlp) const
Make a copy with solver replace by one passed .
BonminSetup(const CoinMessageHandler *handler=NULL)
Default constructor.
static void registerAllOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register all bonmin type executable options.
virtual void setBabDefaultOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Setup the defaults options for this algorithm.
virtual void registerOptions()
Register all the options for this algorithm instance.
void initializeBBB()
Initialize a plain branch-and-bound.
void initialize(const OsiTMINLPInterface &nlpSi, bool createContinuousSolver=true)
Initialize, read options and create appropriate bonmin setup.
BonminSetup(const BonminSetup &setup, OsiTMINLPInterface &nlp)
Copy but uses an other nlp.
BonminSetup(const BonminSetup &other)
Copy constructor.
BonminSetup(const BonminSetup &setup, OsiTMINLPInterface &nlp, const std::string &prefix)
Copy but uses another nlp and algorithm.
static void registerMilpCutGenerators(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register standard MILP cut generators.
BonminSetup * clone(OsiTMINLPInterface &nlp, const std::string &prefix) const
Make a copy but take options with different prefix.
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
(C) Copyright International Business Machines Corporation 2007
Algorithm
Type of algorithms which can be used.
Type for cut generation method with its frequency and string identification.