Cgl 0.60.2

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

- File List
- File Members

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 1442 2019-01-06 16:39:41Z unxusr $
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:
29 virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs,
30 const CglTreeInfo info = CglTreeInfo());
32
37 inline void setRequiredViolation(double value)
39 {
40 requiredViolation_ = value;
41 }
43 inline double getRequiredViolation() const
44 {
45 return requiredViolation_;
46 }
48 inline void setProbingInfo(CglTreeProbingInfo *info)
49 {
50 probingInfo_ = info;
51 }
53
56 void addCut(const OsiCuts &cs);
59 void addCut(const OsiRowCut &cut);
61 void addCut(double lb, double ub, const CoinPackedVector &vector);
63 void addCut(double lb, double ub, int size, const int *colIndices, const double *elements);
64 inline int sizeRowCuts() const
65 {
66 return cuts_.sizeRowCuts();
67 }
68 const OsiRowCut *rowCutPointer(int index) const
69 {
70 return cuts_.rowCutPtr(index);
71 }
73 void saveStuff(double bestObjective, const double *bestSolution,
74 const double *lower, const double *upper);
76 inline const double *bestSolution() const
77 {
78 return bestSolution_;
79 }
81 double bestObjective() const;
83 const double *tightLower() const
84 {
85 return bounds_;
86 }
88 const double *tightUpper() const
89 {
90 return bounds_ + numberColumns_;
91 }
93
96 CglStored(int numberColumns = 0);
98
100 CglStored(const CglStored &rhs);
101
103 CglStored(const char *fileName);
104
106 virtual CglCutGenerator *clone() const;
107
109 CglStored &
110 operator=(const CglStored &rhs);
111
113 virtual ~CglStored();
115
116 protected:
117 // Protected member methods
118
119 // Protected member data
120
123 double requiredViolation_;
126 CglTreeProbingInfo *probingInfo_;
128 OsiCuts cuts_;
130 int numberColumns_;
132 double *bestSolution_;
134 double *bounds_;
136 };
137 #endif
138
139 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
140 */
CglStored::bestSolution_
double * bestSolution_
Best solution (objective at end)
Definition: CglStored.hpp:132
CglStored::CglStored
CglStored(int numberColumns=0)
Default constructor.
CglStored::operator=
CglStored & operator=(const CglStored &rhs)
Assignment operator.
CglStored::numberColumns_
int numberColumns_
Number of columns in model.
Definition: CglStored.hpp:130
CglStored::requiredViolation_
double requiredViolation_
Only add if more than this requiredViolation.
Definition: CglStored.hpp:124
CglStored::getRequiredViolation
double getRequiredViolation() const
Get.
Definition: CglStored.hpp:43
CglStored
Stored Cut Generator Class.
Definition: CglStored.hpp:16
CglCutGenerator.hpp
OsiCuts::rowCutPtr
OsiRowCut * rowCutPtr(int i)
Get pointer to i&#39;th row cut.
Definition: OsiCuts.hpp:416
CglStored::rowCutPointer
const OsiRowCut * rowCutPointer(int index) const
Definition: CglStored.hpp:68
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CoinWarmStartBasis
The default COIN simplex (basis-oriented) warm start class.
Definition: CoinWarmStartBasis.hpp:40
CglStored::clone
virtual CglCutGenerator * clone() const
Clone.
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:61
CglStored::tightUpper
const double * tightUpper() const
Tight upper bounds.
Definition: CglStored.hpp:88
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglStored::bestSolution
const double * bestSolution() const
Best solution (or NULL)
Definition: CglStored.hpp:76
cut
Definition: Cgl012cut.hpp:153
CglStored::bestObjective
double bestObjective() const
Best objective.
CglStored::tightLower
const double * tightLower() const
Tight lower bounds.
Definition: CglStored.hpp:83
CglStored::setProbingInfo
void setProbingInfo(CglTreeProbingInfo *info)
Takes over ownership of probing info.
Definition: CglStored.hpp:48
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
CglStored::probingInfo_
CglTreeProbingInfo * probingInfo_
Pointer to probing information.
Definition: CglStored.hpp:126
CglStored::cuts_
OsiCuts cuts_
Cuts.
Definition: CglStored.hpp:128
CglStored::~CglStored
virtual ~CglStored()
Destructor.
CglStored::bounds_
double * bounds_
Tight bounds.
Definition: CglStored.hpp:134
CglStored::setRequiredViolation
void setRequiredViolation(double value)
Set.
Definition: CglStored.hpp:38
CglTreeProbingInfo
Definition: CglTreeInfo.hpp:92
CglStored::saveStuff
void saveStuff(double bestObjective, const double *bestSolution, const double *lower, const double *upper)
Save stuff.
CglStored::sizeRowCuts
int sizeRowCuts() const
Definition: CglStored.hpp:64
CglStored::addCut
void addCut(const OsiCuts &cs)
Add cuts.
CoinPackedVector
Sparse Vector.
Definition: CoinPackedVector.hpp:123
OsiCuts::sizeRowCuts
int sizeRowCuts() const
Number of row cuts in collection.
Definition: OsiCuts.hpp:398
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.