CbcSolver2.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 
4 #ifndef CbcSolver2_H
5 #define CbcSolver2_H
6 
7 #include "OsiClpSolverInterface.hpp"
8 class CbcModel;
9 //#############################################################################
10 
20 class CbcSolver2 : public OsiClpSolverInterface {
21 
22 public:
23  //---------------------------------------------------------------------------
26  virtual void initialSolve();
28 
30  virtual void resolve();
31 
33 
34 
37  CbcSolver2 ();
39 
41  virtual OsiSolverInterface * clone(bool CopyData=true) const;
42 
44  CbcSolver2 (const CbcSolver2 &);
45 
47  CbcSolver2 & operator=(const CbcSolver2& rhs);
48 
50  virtual ~CbcSolver2 ();
51 
53 
54 
57  void initialize(CbcModel * model, const char * keep);
60  inline const int * when() const
61  { return node_;}
63  inline int getMemory() const
64  { return memory_;}
66  inline int getCount() const
67  { return count_;}
69  inline void setMemory(int value)
70  { memory_=value;}
72  inline void setAlgorithm(int value)
73  { algorithm_=value;}
75  inline int getAlgorithm() const
76  { return algorithm_;}
78  inline void setStrategy(int value)
79  { strategy_=value;}
81  inline int getStrategy() const
82  { return strategy_;}
84 
85  //---------------------------------------------------------------------------
86 
87 private:
88 
91  int * node_;
94  int * howMany_;
98  int count_;
100  int memory_;
106 };
107 
108 #endif
This is to allow the user to replace initialSolve and resolve.
Definition: CbcSolver2.hpp:20
virtual void resolve()
Resolve an LP relaxation after problem modification.
void setAlgorithm(int value)
Say whether to just count usage.
Definition: CbcSolver2.hpp:72
int count_
Counter.
Definition: CbcSolver2.hpp:98
virtual ~CbcSolver2()
Destructor.
int * node_
Node number when variable last in problem.
Definition: CbcSolver2.hpp:92
int algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
Definition: CbcSolver2.hpp:102
int getStrategy() const
Strategy.
Definition: CbcSolver2.hpp:81
int getAlgorithm() const
Say whether to just count usage.
Definition: CbcSolver2.hpp:75
void setMemory(int value)
Set memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:69
CbcSolver2()
Default Constructor.
CbcSolver2 & operator=(const CbcSolver2 &rhs)
Assignment operator.
int strategy_
If 0 get rid of rows, 1 keep rows (to stay dual feasible)
Definition: CbcSolver2.hpp:104
virtual void initialSolve()
Solve initial LP relaxation.
CbcModel * model_
Pointer back to model.
Definition: CbcSolver2.hpp:96
void setStrategy(int value)
Strategy.
Definition: CbcSolver2.hpp:78
void initialize(CbcModel *model, const char *keep)
Setup arrays - ones in keep will always be in.
virtual OsiSolverInterface * clone(bool CopyData=true) const
Clone.
int getMemory() const
Get memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:63
int getCount() const
Get current count.
Definition: CbcSolver2.hpp:66
const int * when() const
get which ones have been used
Definition: CbcSolver2.hpp:60
int * howMany_
How many times in problem.
Definition: CbcSolver2.hpp:94
int memory_
How recently it must have been used.
Definition: CbcSolver2.hpp:100
Simple Branch and bound class.
Definition: CbcModel.hpp:98