Cbc 2.10.11
Loading...
Searching...
No Matches
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"
10class CbcModel;
11//#############################################################################
12
22class CbcSolver2 : public OsiClpSolverInterface {
23
24public:
25 //---------------------------------------------------------------------------
28
29 virtual void initialSolve();
30
32 virtual void resolve();
33
35
40
42 virtual OsiSolverInterface *clone(bool CopyData = true) const;
43
46
49
51 virtual ~CbcSolver2();
52
54
58 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
103private:
107 int *node_;
121};
122
123#endif
Simple Branch and bound class.
Definition CbcModel.hpp:100
This is to allow the user to replace initialSolve and resolve.
int * node_
Node number when variable last in problem.
CbcModel * model_
Pointer back to model.
int getCount() const
Get current count.
virtual ~CbcSolver2()
Destructor.
void setStrategy(int value)
Strategy.
void setMemory(int value)
Set memory (i.e. how recent use should be)
int algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
int * howMany_
How many times in problem.
virtual void resolve()
Resolve an LP relaxation after problem modification.
void setAlgorithm(int value)
Say whether to just count usage.
int memory_
How recently it must have been used.
CbcSolver2(const CbcSolver2 &)
Copy constructor.
virtual OsiSolverInterface * clone(bool CopyData=true) const
Clone.
CbcSolver2()
Default Constructor.
int getAlgorithm() const
Say whether to just count usage.
int getStrategy() const
Strategy.
int strategy_
If 0 get rid of rows, 1 keep rows (to stay dual feasible)
void initialize(CbcModel *model, const char *keep)
Setup arrays - ones in keep will always be in.
int getMemory() const
Get memory (i.e. how recent use should be)
const int * when() const
get which ones have been used
int count_
Counter.
CbcSolver2 & operator=(const CbcSolver2 &rhs)
Assignment operator.
virtual void initialSolve()
Solve initial LP relaxation.