summaryrefslogtreecommitdiff
path: root/build/Bonmin/include/coin/CglLiftAndProject.hpp
diff options
context:
space:
mode:
authorHarpreet2016-08-04 15:25:44 +0530
committerHarpreet2016-08-04 15:25:44 +0530
commit9fd2976931c088dc523974afb901e96bad20f73c (patch)
tree22502de6e6988d5cd595290d11266f8432ad825b /build/Bonmin/include/coin/CglLiftAndProject.hpp
downloadFOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.gz
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.bz2
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.zip
initial add
Diffstat (limited to 'build/Bonmin/include/coin/CglLiftAndProject.hpp')
-rw-r--r--build/Bonmin/include/coin/CglLiftAndProject.hpp104
1 files changed, 104 insertions, 0 deletions
diff --git a/build/Bonmin/include/coin/CglLiftAndProject.hpp b/build/Bonmin/include/coin/CglLiftAndProject.hpp
new file mode 100644
index 0000000..364ba5a
--- /dev/null
+++ b/build/Bonmin/include/coin/CglLiftAndProject.hpp
@@ -0,0 +1,104 @@
+// Copyright (C) 2000, International Business Machines
+// Corporation and others. All Rights Reserved.
+// This code is licensed under the terms of the Eclipse Public License (EPL).
+
+#ifndef CglLiftAndProject_H
+#define CglLiftAndProject_H
+
+#include <string>
+
+#include "CglCutGenerator.hpp"
+
+/** Lift And Project Cut Generator Class */
+class CglLiftAndProject : public CglCutGenerator {
+ friend void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
+ const std::string mpdDir );
+
+public:
+ /**@name Generate Cuts */
+ //@{
+ /** Generate lift-and-project cuts for the
+ model of the solver interface, si.
+ Insert the generated cuts into OsiCut, cs.
+ */
+ virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
+ const CglTreeInfo info = CglTreeInfo());
+
+ /** Get the normalization : Either beta=+1 or beta=-1.
+ */
+
+ double getBeta() const {
+ return beta_;
+ }
+
+ /** Set the normalization : Either beta=+1 or beta=-1.
+ Default value is 1.
+ */
+ void setBeta(int oneOrMinusOne){
+ if (oneOrMinusOne==1 || oneOrMinusOne==-1){
+ beta_= static_cast<double>(oneOrMinusOne);
+ }
+ else {
+ throw CoinError("Unallowable value. Beta must be 1 or -1",
+ "cutGeneration","CglLiftAndProject");
+ }
+ }
+
+ //@}
+
+ /**@name Constructors and destructors */
+ //@{
+ /// Default constructor
+ CglLiftAndProject ();
+
+ /// Copy constructor
+ CglLiftAndProject (
+ const CglLiftAndProject &);
+
+ /// Clone
+ virtual CglCutGenerator * clone() const;
+
+ /// Assignment operator
+ CglLiftAndProject &
+ operator=(
+ const CglLiftAndProject& rhs);
+
+ /// Destructor
+ virtual
+ ~CglLiftAndProject ();
+ /// Create C++ lines to get to current state
+ virtual std::string generateCpp( FILE * fp);
+ //@}
+
+private:
+
+ // Private member methods
+
+ /**@name Private methods */
+ //@{
+
+ //@}
+
+ // Private member data
+
+ /**@name Private member data */
+ //@{
+ /// The normalization is beta_=1 or beta_=-1
+ double beta_;
+ /// epsilon
+ double epsilon_;
+ /// 1-epsilon
+ double onetol_;
+ //@}
+};
+
+//#############################################################################
+/** A function that tests the methods in the CglLiftAndProject class. The
+ only reason for it not to be a member method is that this way it doesn't
+ have to be compiled into the library. And that's a gain, because the
+ library should be compiled with optimization on, but this method should be
+ compiled with debugging. */
+void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
+ const std::string mpdDir );
+
+#endif