summaryrefslogtreecommitdiff
path: root/thirdparty/linux/include/coin/BonEcpCuts.hpp
diff options
context:
space:
mode:
authorHarpreet2016-09-03 00:36:51 +0530
committerHarpreet2016-09-03 00:36:51 +0530
commita0d9443af147e949c1e6a01ac24749d12593ec5b (patch)
tree1a1955c5482ae608fd7f618b06f4ecc6a0d39a23 /thirdparty/linux/include/coin/BonEcpCuts.hpp
parent4b64cf486f5c999fd8167758cae27839f3b50848 (diff)
downloadFOSSEE-Optim-toolbox-development-a0d9443af147e949c1e6a01ac24749d12593ec5b.tar.gz
FOSSEE-Optim-toolbox-development-a0d9443af147e949c1e6a01ac24749d12593ec5b.tar.bz2
FOSSEE-Optim-toolbox-development-a0d9443af147e949c1e6a01ac24749d12593ec5b.zip
cbcintlinprog added
Diffstat (limited to 'thirdparty/linux/include/coin/BonEcpCuts.hpp')
-rw-r--r--thirdparty/linux/include/coin/BonEcpCuts.hpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin/BonEcpCuts.hpp b/thirdparty/linux/include/coin/BonEcpCuts.hpp
new file mode 100644
index 0000000..8f57038
--- /dev/null
+++ b/thirdparty/linux/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