summaryrefslogtreecommitdiff
path: root/build/Bonmin/include/coin/BonEcpCuts.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/BonEcpCuts.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/BonEcpCuts.hpp')
-rw-r--r--build/Bonmin/include/coin/BonEcpCuts.hpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/build/Bonmin/include/coin/BonEcpCuts.hpp b/build/Bonmin/include/coin/BonEcpCuts.hpp
new file mode 100644
index 0000000..8f57038
--- /dev/null
+++ b/build/Bonmin/include/coin/BonEcpCuts.hpp
@@ -0,0 +1,97 @@
+// (C) Copyright International Business Machines (IBM) 2006, 2007
+// All Rights Reserved.
+// This code is published under the Eclipse Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date : 12/20/2006
+
+#ifndef BonECPCuts_HPP
+#define BonECPCuts_HPP
+
+#include "BonOaDecBase.hpp"
+#include "CglCutGenerator.hpp"
+namespace Bonmin
+{
+ class EcpCuts: public OaDecompositionBase
+ {
+ public:
+ EcpCuts(BabSetupBase & b);
+
+ /// Copy constructor
+ EcpCuts(const EcpCuts & copy):
+ OaDecompositionBase(copy),
+ objValue_(copy.objValue_),
+ numRounds_(copy.numRounds_),
+ abs_violation_tol_(copy.abs_violation_tol_),
+ rel_violation_tol_(copy.rel_violation_tol_),
+ beta_(copy.beta_)
+ {}
+
+ /// clone
+ CglCutGenerator * clone() const
+ {
+ return new EcpCuts(*this);
+ }
+
+ /// Destructor
+ virtual ~EcpCuts()
+ {}
+ /** Standard cut generation methods. */
+ virtual void generateCuts(const OsiSolverInterface &si, OsiCuts & cs,
+ const CglTreeInfo info = CglTreeInfo()) const;
+ double doEcpRounds(OsiSolverInterface &si,
+ bool leaveSiUnchanged,
+ double* violation = NULL);
+
+ void setNumRounds(int value)
+ {
+ numRounds_ = value;
+ }
+
+ void setPropabilityFactor(double value)
+ {
+ beta_ = value;
+ }
+
+ void setAbsViolationTolerance(double value)
+ {
+ abs_violation_tol_ = value;
+ }
+ void setRelViolationTolerance(double value)
+ {
+ rel_violation_tol_ = value;
+ }
+
+ /** Register ecp cuts options.*/
+ static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+ protected:
+ /// virtual method which performs the OA algorithm by modifying lp and nlp.
+ virtual double performOa(OsiCuts & cs, solverManip &lpManip,
+ BabInfo * babInfo, double &cutoff, const CglTreeInfo &info) const
+ {
+ throw -1;
+ }
+ /// virutal method to decide if local search is performed
+ virtual bool doLocalSearch(BabInfo * babInfo) const
+ {
+ return 0;
+ }
+ private:
+ /** Record obj value at final point of Ecp. */
+ mutable double objValue_;
+ /** Record NLP infeasibility at final point of Ecp */
+ mutable double violation_;
+ /** maximum number of iterations of generation. */
+ int numRounds_;
+ /** absolute tolerance for NLP constraint violation to stop ECP rounds */
+ double abs_violation_tol_;
+ /** relative tolerance for NLP constraint violation to stop ECP rounds */
+ double rel_violation_tol_;
+ /** Factor for probability for skipping cuts */
+ double beta_;
+ };
+} /* end namespace Bonmin.*/
+#endif