Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CbcSolver2.hpp
Go to the documentation of this file.
1 // $Id$
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 
9 #include "OsiClpSolverInterface.hpp"
10 class CbcModel;
11 //#############################################################################
12 
22 class CbcSolver2 : public OsiClpSolverInterface {
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
CbcSolver2::setMemory
void setMemory(int value)
Set memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:75
CbcSolver2::howMany_
int * howMany_
How many times in problem.
Definition: CbcSolver2.hpp:109
CbcSolver2::memory_
int memory_
How recently it must have been used.
Definition: CbcSolver2.hpp:115
CbcSolver2::strategy_
int strategy_
If 0 get rid of rows, 1 keep rows (to stay dual feasible)
Definition: CbcSolver2.hpp:119
CbcSolver2::getCount
int getCount() const
Get current count.
Definition: CbcSolver2.hpp:70
CbcSolver2::resolve
virtual void resolve()
Resolve an LP relaxation after problem modification.
CbcSolver2::initialSolve
virtual void initialSolve()
Solve initial LP relaxation.
CbcSolver2::~CbcSolver2
virtual ~CbcSolver2()
Destructor.
CbcSolver2
This is to allow the user to replace initialSolve and resolve.
Definition: CbcSolver2.hpp:22
CbcModel
Simple Branch and bound class.
Definition: CbcModel.hpp:100
CbcSolver2::operator=
CbcSolver2 & operator=(const CbcSolver2 &rhs)
Assignment operator.
CbcSolver2::count_
int count_
Counter.
Definition: CbcSolver2.hpp:113
CbcSolver2::setAlgorithm
void setAlgorithm(int value)
Say whether to just count usage.
Definition: CbcSolver2.hpp:80
CbcSolver2::getAlgorithm
int getAlgorithm() const
Say whether to just count usage.
Definition: CbcSolver2.hpp:85
CbcSolver2::when
const int * when() const
get which ones have been used
Definition: CbcSolver2.hpp:60
CbcSolver2::getStrategy
int getStrategy() const
Strategy.
Definition: CbcSolver2.hpp:95
CbcSolver2::node_
int * node_
Node number when variable last in problem.
Definition: CbcSolver2.hpp:107
CbcSolver2::getMemory
int getMemory() const
Get memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:65
CbcSolver2::initialize
void initialize(CbcModel *model, const char *keep)
Setup arrays - ones in keep will always be in.
CbcSolver2::clone
virtual OsiSolverInterface * clone(bool CopyData=true) const
Clone.
CbcSolver2::model_
CbcModel * model_
Pointer back to model.
Definition: CbcSolver2.hpp:111
CbcSolver2::CbcSolver2
CbcSolver2()
Default Constructor.
CbcSolver2::setStrategy
void setStrategy(int value)
Strategy.
Definition: CbcSolver2.hpp:90
CbcSolver2::algorithm_
int algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
Definition: CbcSolver2.hpp:117