Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglStored.hpp
Go to the documentation of this file.
1 // $Id: CglStored.hpp 1119 2013-04-06 20:24:18Z stefan $
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 CglStored_H
7 #define CglStored_H
8 
9 #include <string>
10 
11 #include "CglCutGenerator.hpp"
12 
13 class CoinWarmStartBasis;
14 class CglTreeProbingInfo;
16 class CglStored : public CglCutGenerator {
17 
18 public:
19 
20 
31  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
32  const CglTreeInfo info = CglTreeInfo());
34 
39  inline void setRequiredViolation(double value)
41  { requiredViolation_=value;}
43  inline double getRequiredViolation() const
44  { return requiredViolation_;}
46  inline void setProbingInfo(CglTreeProbingInfo * info)
47  { probingInfo_ = info;}
49 
52  void addCut(const OsiCuts & cs);
55  void addCut(const OsiRowCut & cut);
57  void addCut(double lb, double ub, const CoinPackedVector & vector);
59  void addCut(double lb, double ub, int size, const int * colIndices, const double * elements);
60  inline int sizeRowCuts() const
61  { return cuts_.sizeRowCuts();}
62  const OsiRowCut * rowCutPointer(int index) const
63  { return cuts_.rowCutPtr(index);}
65  void saveStuff(double bestObjective, const double * bestSolution,
66  const double * lower, const double * upper);
68  inline const double * bestSolution() const
69  { return bestSolution_;}
71  double bestObjective() const;
73  const double * tightLower() const
74  { return bounds_;}
76  const double * tightUpper() const
77  { return bounds_+numberColumns_;}
79 
82  CglStored (int numberColumns=0);
84 
86  CglStored (const CglStored & rhs);
87 
89  CglStored (const char * fileName);
90 
92  virtual CglCutGenerator * clone() const;
93 
95  CglStored &
96  operator=(const CglStored& rhs);
97 
99  virtual
100  ~CglStored ();
102 
103 protected:
104 
105  // Protected member methods
106 
107  // Protected member data
108 
111  double requiredViolation_;
120  double * bestSolution_;
122  double * bounds_;
124 };
125 #endif
double * bestSolution_
Best solution (objective at end)
Definition: CglStored.hpp:120
CglStored(int numberColumns=0)
Default constructor.
CglStored & operator=(const CglStored &rhs)
Assignment operator.
int numberColumns_
Number of columns in model.
Definition: CglStored.hpp:118
double requiredViolation_
Only add if more than this requiredViolation.
Definition: CglStored.hpp:112
double getRequiredViolation() const
Get.
Definition: CglStored.hpp:43
Stored Cut Generator Class.
Definition: CglStored.hpp:16
OsiRowCut * rowCutPtr(int i)
Get pointer to i&#39;th row cut.
Definition: OsiCuts.hpp:386
const OsiRowCut * rowCutPointer(int index) const
Definition: CglStored.hpp:62
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
The default COIN simplex (basis-oriented) warm start class.
virtual CglCutGenerator * clone() const
Clone.
Abstract Base Class for describing an interface to a solver.
const double * tightUpper() const
Tight upper bounds.
Definition: CglStored.hpp:76
Cut Generator Base Class.
const double * bestSolution() const
Best solution (or NULL)
Definition: CglStored.hpp:68
double bestObjective() const
Best objective.
const double * tightLower() const
Tight lower bounds.
Definition: CglStored.hpp:73
void setProbingInfo(CglTreeProbingInfo *info)
Takes over ownership of probing info.
Definition: CglStored.hpp:46
Row Cut Class.
Definition: OsiRowCut.hpp:29
CglTreeProbingInfo * probingInfo_
Pointer to probing information.
Definition: CglStored.hpp:114
OsiCuts cuts_
Cuts.
Definition: CglStored.hpp:116
virtual ~CglStored()
Destructor.
double * bounds_
Tight bounds.
Definition: CglStored.hpp:122
void setRequiredViolation(double value)
Set.
Definition: CglStored.hpp:40
void saveStuff(double bestObjective, const double *bestSolution, const double *lower, const double *upper)
Save stuff.
int sizeRowCuts() const
Definition: CglStored.hpp:60
void addCut(const OsiCuts &cs)
Add cuts.
Sparse Vector.
int sizeRowCuts() const
Number of row cuts in collection.
Definition: OsiCuts.hpp:374
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate Mixed Integer Stored cuts for the model of the solver interface, si.