Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcSolver3.hpp
Go to the documentation of this file.
1 // $Id: CbcSolver3.hpp 2469 2019-01-06 23:17:46Z unxusr $
2 // Copyright (C) 2004, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef CbcSolver3_H
7 #define CbcSolver3_H
8 
10 class CbcModel;
11 //#############################################################################
12 
19 
20 public:
21  //---------------------------------------------------------------------------
24  virtual void initialSolve();
26 
28  virtual void resolve();
29 
31 
34  CbcSolver3();
36 
38  virtual OsiSolverInterface *clone(bool CopyData = true) const;
39 
41  CbcSolver3(const CbcSolver3 &);
42 
44  CbcSolver3 &operator=(const CbcSolver3 &rhs);
45 
47  virtual ~CbcSolver3();
48 
50 
53  void initialize(CbcModel *model, const char *keep);
56  inline const int *when() const
57  {
58  return node_;
59  }
61  inline int getMemory() const
62  {
63  return memory_;
64  }
66  inline int getCount() const
67  {
68  return count_;
69  }
71  inline void setMemory(int value)
72  {
73  memory_ = value;
74  }
76  inline void setBelieveInfeasible(bool yesNo)
77  {
78  believeInfeasible_ = yesNo;
79  }
81  inline void setAlgorithm(int value)
82  {
83  algorithm_ = value;
84  }
86  inline void setNested(double value)
87  {
88  nestedSearch_ = value;
89  }
91  inline int getAlgorithm() const
92  {
93  return algorithm_;
94  }
96  inline double getNested() const
97  {
98  return nestedSearch_;
99  }
101 
102  //---------------------------------------------------------------------------
103 
104 private:
107  double nestedSearch_;
110  int *node_;
112  int *howMany_;
116  int count_;
118  int memory_;
124 };
125 
126 #endif
virtual ~CbcSolver3()
Destructor.
int getCount() const
Get current count.
Definition: CbcSolver3.hpp:66
CbcSolver3 & operator=(const CbcSolver3 &rhs)
Assignment operator.
This is to allow the user to replace initialSolve and resolve.
Definition: CbcSolver3.hpp:18
void setAlgorithm(int value)
Say whether to just count usage.
Definition: CbcSolver3.hpp:81
Clp Solver Interface.
CbcSolver3()
Default Constructor.
Abstract Base Class for describing an interface to a solver.
CbcModel * model_
Pointer back to model.
Definition: CbcSolver3.hpp:114
void setMemory(int value)
Set memory (i.e. how recent use should be)
Definition: CbcSolver3.hpp:71
void initialize(CbcModel *model, const char *keep)
Setup arrays - ones in keep will always be in.
virtual void resolve()
Resolve an LP relaxation after problem modification.
int count_
Counter.
Definition: CbcSolver3.hpp:116
double nestedSearch_
Do nested search if this fraction fixed.
Definition: CbcSolver3.hpp:108
void setNested(double value)
Do nested search if this fraction fixed.
Definition: CbcSolver3.hpp:86
bool believeInfeasible_
If infeasible on subset means infeasible.
Definition: CbcSolver3.hpp:120
void setBelieveInfeasible(bool yesNo)
Say whether to believe infeasible.
Definition: CbcSolver3.hpp:76
virtual OsiSolverInterface * clone(bool CopyData=true) const
Clone.
int * node_
Node number when variable last in problem.
Definition: CbcSolver3.hpp:110
int memory_
How recently it must have been used.
Definition: CbcSolver3.hpp:118
const int * when() const
get which ones have been used
Definition: CbcSolver3.hpp:56
int * howMany_
How many times in problem.
Definition: CbcSolver3.hpp:112
double getNested() const
Do nested search if this fraction fixed.
Definition: CbcSolver3.hpp:96
int getAlgorithm() const
Say whether to just count usage.
Definition: CbcSolver3.hpp:91
int getMemory() const
Get memory (i.e. how recent use should be)
Definition: CbcSolver3.hpp:61
bool algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
Definition: CbcSolver3.hpp:122
Simple Branch and bound class.
Definition: CbcModel.hpp:100
virtual void initialSolve()
Solve initial LP relaxation.