- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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_;
114 CglTreeProbingInfo * probingInfo_;
116 OsiCuts cuts_;
118 int numberColumns_;
120 double * bestSolution_;
122 double * bounds_;
124 };
125 #endif
CglStored::bounds_
double * bounds_
Tight bounds.
Definition: CglStored.hpp:122
CglStored::probingInfo_
CglTreeProbingInfo * probingInfo_
Pointer to probing information.
Definition: CglStored.hpp:114
CglStored::operator=
CglStored & operator=(const CglStored &rhs)
Assignment operator.
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
CglStored::tightUpper
const double * tightUpper() const
Tight upper bounds.
Definition: CglStored.hpp:76
CglStored::bestSolution_
double * bestSolution_
Best solution (objective at end)
Definition: CglStored.hpp:120
CglStored::clone
virtual CglCutGenerator * clone() const
Clone.
CglStored::requiredViolation_
double requiredViolation_
Only add if more than this requiredViolation.
Definition: CglStored.hpp:112
CglStored::CglStored
CglStored(int numberColumns=0)
Default constructor.
CglStored::getRequiredViolation
double getRequiredViolation() const
Get.
Definition: CglStored.hpp:43
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CglStored::saveStuff
void saveStuff(double bestObjective, const double *bestSolution, const double *lower, const double *upper)
Save stuff.
CglStored::setRequiredViolation
void setRequiredViolation(double value)
Set.
Definition: CglStored.hpp:40
CglStored::bestObjective
double bestObjective() const
Best objective.
CglTreeProbingInfo
Definition: CglTreeInfo.hpp:85
CglStored::numberColumns_
int numberColumns_
Number of columns in model.
Definition: CglStored.hpp:118
CglCutGenerator.hpp
cut
Definition: Cgl012cut.hpp:153
OsiCuts::sizeRowCuts
int sizeRowCuts() const
Number of row cuts in collection.
Definition: OsiCuts.hpp:374
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
CglStored::tightLower
const double * tightLower() const
Tight lower bounds.
Definition: CglStored.hpp:73
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglStored::~CglStored
virtual ~CglStored()
Destructor.
CglStored::generateCuts
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.
CoinPackedVector
Sparse Vector.
Definition: CoinPackedVector.hpp:123
CglStored::sizeRowCuts
int sizeRowCuts() const
Add cuts.
Definition: CglStored.hpp:60
OsiCuts::rowCutPtr
OsiRowCut * rowCutPtr(int i)
Get pointer to i&#39;th row cut.
Definition: OsiCuts.hpp:386
CglStored::rowCutPointer
const OsiRowCut * rowCutPointer(int index) const
Add cuts.
Definition: CglStored.hpp:62
CglStored
Stored Cut Generator Class.
Definition: CglStored.hpp:16
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
CglStored::bestSolution
const double * bestSolution() const
Best solution (or NULL)
Definition: CglStored.hpp:68
CglStored::setProbingInfo
void setProbingInfo(CglTreeProbingInfo *info)
Takes over ownership of probing info.
Definition: CglStored.hpp:46
CoinWarmStartBasis
The default COIN simplex (basis-oriented) warm start class.
Definition: CoinWarmStartBasis.hpp:40
CglStored::cuts_
OsiCuts cuts_
Cuts.
Definition: CglStored.hpp:116
CglStored::addCut
void addCut(const OsiCuts &cs)
Add cuts.