source: trunk/Cbc/examples/CbcSolver3.hpp @ 1432

Last change on this file since 1432 was 706, checked in by forrest, 12 years ago

take out };

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1// Copyright (C) 2004, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#ifndef CbcSolver3_H
5#define CbcSolver3_H
6
7#include "OsiClpSolverInterface.hpp"
8class CbcModel;
9//#############################################################################
10
11/**
12
13    This is to allow the user to replace initialSolve and resolve
14*/
15
16class CbcSolver3 : public OsiClpSolverInterface {
17
18public:
19  //---------------------------------------------------------------------------
20  /**@name Solve methods */
21  //@{
22    /// Solve initial LP relaxation
23    virtual void initialSolve();
24
25    /// Resolve an LP relaxation after problem modification
26    virtual void resolve();
27
28  //@}
29
30
31  /**@name Constructors and destructors */
32  //@{
33    /// Default Constructor
34    CbcSolver3 ();
35   
36    /// Clone
37    virtual OsiSolverInterface * clone(bool CopyData=true) const;
38   
39    /// Copy constructor
40    CbcSolver3 (const CbcSolver3 &);
41   
42    /// Assignment operator
43    CbcSolver3 & operator=(const CbcSolver3& rhs);
44   
45    /// Destructor
46    virtual ~CbcSolver3 ();
47
48  //@}
49
50
51  /**@name Sets and Getss */
52  //@{
53  /// Setup arrays - ones in keep will always be in
54  void initialize(CbcModel * model, const char * keep);
55  /// get which ones have been used
56  inline const int * when() const
57  { return node_;}
58  /// Get memory (i.e. how recent use should be)
59  inline int getMemory() const
60  { return memory_;}
61  /// Get current count
62  inline int getCount() const
63  { return count_;}
64  /// Set memory (i.e. how recent use should be)
65  inline void setMemory(int value)
66  { memory_=value;}
67  /// Say whether to believe infeasible
68  inline void setBelieveInfeasible(bool yesNo)
69  { believeInfeasible_=yesNo;}
70  /// Say whether to just count usage
71  inline void setAlgorithm(int value)
72  { algorithm_=value;}
73  /// Do nested search if this fraction fixed
74  inline void setNested(double value)
75  { nestedSearch_=value;}
76  /// Say whether to just count usage
77  inline int getAlgorithm() const
78  { return algorithm_;}
79  /// Do nested search if this fraction fixed
80  inline double getNested() const
81  { return nestedSearch_;}
82  //@}
83
84  //---------------------------------------------------------------------------
85
86private:
87 
88  /**@name Private member data */
89  //@{
90  /// Do nested search if this fraction fixed
91  double nestedSearch_;
92  /// Node number when variable last in problem
93  int * node_;
94  /// How many times in problem
95  int * howMany_;
96  /// Pointer back to model
97  CbcModel * model_;
98  /// Counter
99  int count_;
100  /// How recently it must have been used
101  int memory_;
102  /// If infeasible on subset means infeasible
103  bool believeInfeasible_;
104  /// If 0 nothing, 1 compress and fix, 2 long thin
105  bool algorithm_;
106  //@}
107};
108
109#endif
Note: See TracBrowser for help on using the repository browser.