summaryrefslogtreecommitdiff
path: root/thirdparty/linux/include/coin/BonCbc.hpp
diff options
context:
space:
mode:
authorGeorgey2017-07-05 11:40:43 +0530
committerGeorgey2017-07-05 11:40:43 +0530
commit938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427 (patch)
treeb343c0ee5609433c80e0de1db8b6886c9126dc2d /thirdparty/linux/include/coin/BonCbc.hpp
parent5b72577efe080c5294b32d804e4d26351fef30bc (diff)
downloadFOSSEE-Optimization-toolbox-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.tar.gz
FOSSEE-Optimization-toolbox-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.tar.bz2
FOSSEE-Optimization-toolbox-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.zip
Added linux shared libraries and header files for int and ecos functions
Diffstat (limited to 'thirdparty/linux/include/coin/BonCbc.hpp')
-rw-r--r--thirdparty/linux/include/coin/BonCbc.hpp127
1 files changed, 127 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin/BonCbc.hpp b/thirdparty/linux/include/coin/BonCbc.hpp
new file mode 100644
index 0000000..caa178e
--- /dev/null
+++ b/thirdparty/linux/include/coin/BonCbc.hpp
@@ -0,0 +1,127 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Eclipse Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/19/2007
+
+#ifndef BonCbc_H
+#define BonCbc_H
+
+//#include "BonBabSetupBase.hpp"
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+ class BabSetupBase;
+ class Bab
+ {
+ public:
+ /** Integer optimization return codes.*/
+ enum MipStatuses {FeasibleOptimal /** Optimum solution has been found and its optimality proved.*/,
+ ProvenInfeasible /** Problem has been proven to be infeasible.*/,
+ Feasible /** An integer solution to the problem has been found.*/,
+ UnboundedOrInfeasible /*Coninuous relaxation is unbounded.*/,
+ NoSolutionKnown/** No feasible solution to the problem is known*/,
+ NumMipStats};
+
+
+ /** Constructor.*/
+ Bab();
+ /** destructor.*/
+ virtual ~Bab();
+ /** Perform a branch-and-bound using given setup.*/
+ virtual void branchAndBound(BabSetupBase & s);
+
+ /**operator() performs the branchAndBound*/
+ virtual void operator()(BabSetupBase & s);
+
+ /**operator() performs the branchAndBound*/
+ virtual void operator()(BabSetupBase * s){
+ operator()(*s);}
+
+ /** get the best solution known to the problem (is optimal if MipStatus is FeasibleOptimal).
+ if no solution is known returns NULL.*/
+ const double * bestSolution() const
+ {
+ return bestSolution_;
+ }
+ /** return objective value of the bestSolution */
+ double bestObj() const
+ {
+ return bestObj_;
+ }
+
+ /** return Mip Status */
+ MipStatuses mipStatus() const
+ {
+ return mipStatus_;
+ }
+
+ /** return the best known lower bound on the objective value*/
+ double bestBound();
+
+ /** return the total number of nodes explored.*/
+ int numNodes() const
+ {
+ return numNodes_;
+ }
+ /** return the total number of iterations in the last mip solved.*/
+ int iterationCount()
+ {
+ return mipIterationCount_;
+ }
+ /** returns the value of the continuous relaxation. */
+ double continuousRelaxation()
+ {
+ return continuousRelaxation_;
+ }
+
+ /** virtual callback function to eventually modify objects for integer variable
+ (replace with user set). This is called after CbcModel::findIntegers */
+ virtual void replaceIntegers(OsiObject ** objects, int numberObjects)
+ {}
+ /** Get cbc model used to solve. */
+ const CbcModel& model() const
+ {
+ return model_;
+ }
+
+ /** Get cbc model used to solve as non-const, in case we want to
+ change options before things happen */
+ CbcModel& model()
+ {
+ return model_;
+ }
+
+ protected:
+ /** Stores the solution of MIP. */
+ double * bestSolution_;
+
+ /** Status of the mip solved*/
+ MipStatuses mipStatus_;
+ /** objValue of MIP */
+ double bestObj_;
+ /** best known (lower) bound.*/
+ double bestBound_;
+ /** Continuous relaxation of the problem */
+ double continuousRelaxation_;
+ /** Number of nodes enumerated.*/
+ int numNodes_;
+ /** get total number of iterations in last mip solved.*/
+ int mipIterationCount_;
+ /** CbcModel used to solve problem.*/
+ CbcModel model_;
+ /** Message handler for CbcModel. */
+ CoinMessageHandler * modelHandler_;
+ /** \brief OsiObjects of the model.
+ * this is not null if and only if there are some non-simple-integer branching objects such as SOS constraints.
+ * It is up to Bab to pass them over to appropriate components of the algorithm. */
+ OsiObject** objects_;
+ /** number of objects.*/
+ int nObjects_;
+ };
+}
+#endif