Cbc  2.9.9
 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 1574 2011-01-05 01:13:55Z lou $
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 
36 
39  CbcSolver2 ();
41 
43  virtual OsiSolverInterface * clone(bool CopyData=true) const;
44 
46  CbcSolver2 (const CbcSolver2 &);
47 
49  CbcSolver2 & operator=(const CbcSolver2& rhs);
50 
52  virtual ~CbcSolver2 ();
53 
55 
56 
59  void initialize(CbcModel * model, const char * keep);
62  inline const int * when() const
63  { return node_;}
65  inline int getMemory() const
66  { return memory_;}
68  inline int getCount() const
69  { return count_;}
71  inline void setMemory(int value)
72  { memory_=value;}
74  inline void setAlgorithm(int value)
75  { algorithm_=value;}
77  inline int getAlgorithm() const
78  { return algorithm_;}
80  inline void setStrategy(int value)
81  { strategy_=value;}
83  inline int getStrategy() const
84  { return strategy_;}
86 
87  //---------------------------------------------------------------------------
88 
89 private:
90 
93  int * node_;
96  int * howMany_;
100  int count_;
102  int memory_;
108 };
109 
110 #endif
virtual void resolve()
Resolve an LP relaxation after problem modification.
int getAlgorithm() const
Say whether to just count usage.
Definition: CbcSolver2.hpp:77
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:94
int getStrategy() const
Strategy.
Definition: CbcSolver2.hpp:83
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:98
CbcSolver2()
Default Constructor.
void setMemory(int value)
Set memory (i.e. how recent use should be)
Definition: CbcSolver2.hpp:71
void setStrategy(int value)
Strategy.
Definition: CbcSolver2.hpp:80
const int * when() const
get which ones have been used
Definition: CbcSolver2.hpp:62
int memory_
How recently it must have been used.
Definition: CbcSolver2.hpp:102
int algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
Definition: CbcSolver2.hpp:104
int getCount() const
Get current count.
Definition: CbcSolver2.hpp:68
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:96
int count_
Counter.
Definition: CbcSolver2.hpp:100
void setAlgorithm(int value)
Say whether to just count usage.
Definition: CbcSolver2.hpp:74
virtual ~CbcSolver2()
Destructor.
Simple Branch and bound class.
Definition: CbcModel.hpp:101
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:106
virtual void initialSolve()
Solve initial LP relaxation.