Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcSolver2.hpp
Go to the documentation of this file.
1 // $Id: CbcSolver2.hpp 2469 2019-01-06 23:17:46Z unxusr $
2 // Copyright (C) 2005, 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 CbcSolver2_H
7 #define CbcSolver2_H
8 
10 class CbcModel;
11 //#############################################################################
12 
23 
24 public:
25  //---------------------------------------------------------------------------
28  virtual void initialSolve();
30 
32  virtual void resolve();
33 
35 
38  CbcSolver2();
40 
42  virtual OsiSolverInterface *clone(bool CopyData = true) const;
43 
45  CbcSolver2(const CbcSolver2 &);
46 
48  CbcSolver2 &operator=(const CbcSolver2 &rhs);
49 
51  virtual ~CbcSolver2();
52 
54 
57  void initialize(CbcModel *model, const char *keep);
60  inline const int *when() const
61  {
62  return node_;
63  }
65  inline int getMemory() const
66  {
67  return memory_;
68  }
70  inline int getCount() const
71  {
72  return count_;
73  }
75  inline void setMemory(int value)
76  {
77  memory_ = value;
78  }
80  inline void setAlgorithm(int value)
81  {
82  algorithm_ = value;
83  }
85  inline int getAlgorithm() const
86  {
87  return algorithm_;
88  }
90  inline void setStrategy(int value)
91  {
92  strategy_ = value;
93  }
95  inline int getStrategy() const
96  {
97  return strategy_;
98  }
100 
101  //---------------------------------------------------------------------------
102 
103 private:
106  int *node_;
109  int *howMany_;
113  int count_;
115  int memory_;
121 };
122 
123 #endif
virtual void resolve()
Resolve an LP relaxation after problem modification.
int getAlgorithm() const
Say whether to just count usage.
Definition: CbcSolver2.hpp:85
CbcSolver2 & operator=(const CbcSolver2 &rhs)
Assignment operator.
void initialize(CbcModel *model, const char *keep)
Setup arrays - ones in keep will always be in.
int * node_
Node number when variable last in problem.
Definition: CbcSolver2.hpp:107
int getStrategy() const
Strategy.
Definition: CbcSolver2.hpp:95
Clp Solver Interface.
int getMemory() const
Get memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:65
Abstract Base Class for describing an interface to a solver.
CbcModel * model_
Pointer back to model.
Definition: CbcSolver2.hpp:111
CbcSolver2()
Default Constructor.
void setMemory(int value)
Set memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:75
void setStrategy(int value)
Strategy.
Definition: CbcSolver2.hpp:90
const int * when() const
get which ones have been used
Definition: CbcSolver2.hpp:60
int memory_
How recently it must have been used.
Definition: CbcSolver2.hpp:115
int algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
Definition: CbcSolver2.hpp:117
int getCount() const
Get current count.
Definition: CbcSolver2.hpp:70
This is to allow the user to replace initialSolve and resolve.
Definition: CbcSolver2.hpp:22
int * howMany_
How many times in problem.
Definition: CbcSolver2.hpp:109
int count_
Counter.
Definition: CbcSolver2.hpp:113
void setAlgorithm(int value)
Say whether to just count usage.
Definition: CbcSolver2.hpp:80
virtual ~CbcSolver2()
Destructor.
Simple Branch and bound class.
Definition: CbcModel.hpp:100
virtual OsiSolverInterface * clone(bool CopyData=true) const
Clone.
int strategy_
If 0 get rid of rows, 1 keep rows (to stay dual feasible)
Definition: CbcSolver2.hpp:119
virtual void initialSolve()
Solve initial LP relaxation.