diff options
author | Harpreet | 2016-09-03 00:36:51 +0530 |
---|---|---|
committer | Harpreet | 2016-09-03 00:36:51 +0530 |
commit | a0d9443af147e949c1e6a01ac24749d12593ec5b (patch) | |
tree | 1a1955c5482ae608fd7f618b06f4ecc6a0d39a23 /thirdparty/linux/include/coin/BonCbcNlpStrategy.hpp | |
parent | 4b64cf486f5c999fd8167758cae27839f3b50848 (diff) | |
download | FOSSEE-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/BonCbcNlpStrategy.hpp')
-rw-r--r-- | thirdparty/linux/include/coin/BonCbcNlpStrategy.hpp | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin/BonCbcNlpStrategy.hpp b/thirdparty/linux/include/coin/BonCbcNlpStrategy.hpp new file mode 100644 index 0000000..b642ad0 --- /dev/null +++ b/thirdparty/linux/include/coin/BonCbcNlpStrategy.hpp @@ -0,0 +1,98 @@ +// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006 +// All Rights Reserved. +// This code is published under the Eclipse Public License. +// +// Authors : +// John J. Forrest, International Business Machines Corporation +// Pierre Bonami, Carnegie Mellon University, +// +// Date : 03/15/2006 + +#ifndef BonCbcNlpStrategy_H +#define BonCbcNlpStrategy_H + +#include "CbcStrategy.hpp" +class CglPreProcess; +class CbcNodeInfo; +class CbcNode; +class CoinWarmStartDiff; + + +namespace Bonmin +{ + class CbcNlpStrategy : public CbcStrategy + { + public: + + // Default Constructor + CbcNlpStrategy (int maxFailures, + int maxInfeasibles, + int pretendFailIsInfeasible); + + // Copy constructor + CbcNlpStrategy ( const CbcNlpStrategy &); + + // Destructor + virtual ~CbcNlpStrategy (); + + /// Clone + virtual CbcStrategy * clone() const; + + /// Return a new Full node information pointer (descendant of CbcFullNodeInfo) + virtual CbcNodeInfo * fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const; + /// Return a new Partial node information pointer (descendant of CbcPartialNodeInfo) + virtual CbcNodeInfo * partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner, + int numberChangedBounds,const int * variables, + const double * boundChanges, + const CoinWarmStartDiff *basisDiff) const; + /** After a CbcModel::resolve this can return a status + -1 no effect + 0 treat as optimal + 1 as 0 but do not do any more resolves (i.e. no more cuts) + 2 treat as infeasible + */ + virtual int status(CbcModel * model, CbcNodeInfo * parent, int whereFrom); + /// set maximum number of consecutive failures in a branch before giving up + inline void setMaxFailure(int value) + { + maxFailure_ = value; + } + /// maximum number of consecutive infeasible nodes before giving up + inline void setMaxInfeasible(int value) + { + maxInfeasible_ = value; + } + + /// Setup cut generators + virtual void setupCutGenerators(CbcModel & model); + /// Setup heuristics + virtual void setupHeuristics(CbcModel & model); + /// Do printing stuff + virtual void setupPrinting(CbcModel & model,int modelLogLevel); + /// Other stuff e.g. strong branching and preprocessing + virtual void setupOther(CbcModel & model); + + bool hasFailed() + { + return hasFailed_; + } + protected: + // Data + /// did we fail? + bool hasFailed_; + /// maximum number of consecutive failures in a branch before giving up + int maxFailure_; + /// maximum number of consecutive infeasible nodes before giving up + int maxInfeasible_; + /** If yes when a problem is not solved (failed to be solved) + will pretend that it is infeasible. */ + int pretendFailIsInfeasible_; + + private: + /// Illegal Assignment operator + CbcNlpStrategy & operator=(const CbcNlpStrategy& rhs); + + }; +} + +#endif |