Bonmin 1.8.9
Loading...
Searching...
No Matches
BonCbcNlpStrategy.hpp
Go to the documentation of this file.
1// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors :
6// John J. Forrest, International Business Machines Corporation
7// Pierre Bonami, Carnegie Mellon University,
8//
9// Date : 03/15/2006
10
11#ifndef BonCbcNlpStrategy_H
12#define BonCbcNlpStrategy_H
13
14#include "CbcStrategy.hpp"
15class CglPreProcess;
16class CbcNodeInfo;
17class CbcNode;
19
20
21namespace Bonmin
22{
23 class CbcNlpStrategy : public CbcStrategy
24 {
25 public:
26
27 // Default Constructor
28 CbcNlpStrategy (int maxFailures,
29 int maxInfeasibles,
30 int pretendFailIsInfeasible);
31
32 // Copy constructor
34
35 // Destructor
36 virtual ~CbcNlpStrategy ();
37
39 virtual CbcStrategy * clone() const;
40
42 virtual CbcNodeInfo * fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const;
44 virtual CbcNodeInfo * partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
45 int numberChangedBounds,const int * variables,
46 const double * boundChanges,
47 const CoinWarmStartDiff *basisDiff) const;
54 virtual int status(CbcModel * model, CbcNodeInfo * parent, int whereFrom);
56 inline void setMaxFailure(int value)
57 {
58 maxFailure_ = value;
59 }
61 inline void setMaxInfeasible(int value)
62 {
63 maxInfeasible_ = value;
64 }
65
67 virtual void setupCutGenerators(CbcModel & model);
69 virtual void setupHeuristics(CbcModel & model);
71 virtual void setupPrinting(CbcModel & model,int modelLogLevel);
73 virtual void setupOther(CbcModel & model);
74
75 bool hasFailed()
76 {
77 return hasFailed_;
78 }
79 protected:
80 // Data
90
91 private:
93 CbcNlpStrategy & operator=(const CbcNlpStrategy& rhs);
94
95 };
96}
97
98#endif
void setMaxInfeasible(int value)
maximum number of consecutive infeasible nodes before giving up
virtual void setupOther(CbcModel &model)
Other stuff e.g. strong branching and preprocessing.
int maxInfeasible_
maximum number of consecutive infeasible nodes before giving up
int pretendFailIsInfeasible_
If yes when a problem is not solved (failed to be solved) will pretend that it is infeasible.
CbcNlpStrategy(const CbcNlpStrategy &)
void setMaxFailure(int value)
set maximum number of consecutive failures in a branch before giving up
virtual CbcStrategy * clone() const
Clone.
virtual CbcNodeInfo * partialNodeInfo(CbcModel *model, CbcNodeInfo *parent, CbcNode *owner, int numberChangedBounds, const int *variables, const double *boundChanges, const CoinWarmStartDiff *basisDiff) const
Return a new Partial node information pointer (descendant of CbcPartialNodeInfo)
virtual void setupPrinting(CbcModel &model, int modelLogLevel)
Do printing stuff.
virtual int status(CbcModel *model, CbcNodeInfo *parent, int whereFrom)
After a CbcModel::resolve this can return a status -1 no effect 0 treat as optimal 1 as 0 but do not ...
virtual CbcNodeInfo * fullNodeInfo(CbcModel *model, int numberRowsAtContinuous) const
Return a new Full node information pointer (descendant of CbcFullNodeInfo)
CbcNlpStrategy(int maxFailures, int maxInfeasibles, int pretendFailIsInfeasible)
virtual void setupCutGenerators(CbcModel &model)
Setup cut generators.
virtual void setupHeuristics(CbcModel &model)
Setup heuristics.
int maxFailure_
maximum number of consecutive failures in a branch before giving up
(C) Copyright International Business Machines Corporation 2007