Loading...
Searching...
No Matches
CglStored.hpp
Go to the documentation of this file.
// $Id$
// Copyright (C) 2005, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef CglStored_H
#define CglStored_H
#include <string>
#include "CglCutGenerator.hpp"
class CoinWarmStartBasis;
class CglTreeProbingInfo;
class CglStored : public CglCutGenerator {
public:
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs,
const CglTreeInfo info = CglTreeInfo());
inline void setRequiredViolation(double value)
{
requiredViolation_ = value;
}
inline double getRequiredViolation() const
{
return requiredViolation_;
}
inline void setProbingInfo(CglTreeProbingInfo *info)
{
probingInfo_ = info;
}
void addCut(const OsiCuts &cs);
void addCut(const OsiRowCut &cut);
void addCut(double lb, double ub, const CoinPackedVector &vector);
void addCut(double lb, double ub, int size, const int *colIndices, const double *elements);
inline int sizeRowCuts() const
{
return cuts_.sizeRowCuts();
}
const OsiRowCut *rowCutPointer(int index) const
{
return cuts_.rowCutPtr(index);
}
void saveStuff(double bestObjective, const double *bestSolution,
const double *lower, const double *upper);
inline const double *bestSolution() const
{
return bestSolution_;
}
double bestObjective() const;
const double *tightLower() const
{
return bounds_;
}
const double *tightUpper() const
{
return bounds_ + numberColumns_;
}
CglStored(int numberColumns = 0);
CglStored(const CglStored &rhs);
CglStored(const char *fileName);
virtual CglCutGenerator *clone() const;
CglStored &
operator=(const CglStored &rhs);
virtual ~CglStored();
protected:
// Protected member methods
// Protected member data
double requiredViolation_;
CglTreeProbingInfo *probingInfo_;
OsiCuts cuts_;
int numberColumns_;
double *bestSolution_;
double *bounds_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
CglCutGenerator.hpp
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglStored::setRequiredViolation
void setRequiredViolation(double value)
Set.
Definition CglStored.hpp:38
CglStored::setProbingInfo
void setProbingInfo(CglTreeProbingInfo *info)
Takes over ownership of probing info.
Definition CglStored.hpp:48
CglStored::numberColumns_
int numberColumns_
Number of columns in model.
Definition CglStored.hpp:130
CglStored::~CglStored
virtual ~CglStored()
Destructor.
CglStored::addCut
void addCut(double lb, double ub, int size, const int *colIndices, const double *elements)
Add a row cut from elements.
CglStored::bounds_
double * bounds_
Tight bounds.
Definition CglStored.hpp:134
CglStored::addCut
void addCut(double lb, double ub, const CoinPackedVector &vector)
Add a row cut from a packed vector.
CglStored::bestSolution
const double * bestSolution() const
Best solution (or NULL).
Definition CglStored.hpp:76
CglStored::addCut
void addCut(const OsiCuts &cs)
Add cuts.
CglStored::probingInfo_
CglTreeProbingInfo * probingInfo_
Pointer to probing information.
Definition CglStored.hpp:126
CglStored::sizeRowCuts
int sizeRowCuts() const
Definition CglStored.hpp:64
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.
CglStored::saveStuff
void saveStuff(double bestObjective, const double *bestSolution, const double *lower, const double *upper)
Save stuff.
CglStored::clone
virtual CglCutGenerator * clone() const
Clone.
CglStored::bestSolution_
double * bestSolution_
Best solution (objective at end).
Definition CglStored.hpp:132
CglStored::CglStored
CglStored(const char *fileName)
Constructor from file.
CglStored::addCut
void addCut(const OsiRowCut &cut)
Add a row cut.
CglStored::bestObjective
double bestObjective() const
Best objective.
CglStored::operator=
CglStored & operator=(const CglStored &rhs)
Assignment operator.
CglStored::requiredViolation_
double requiredViolation_
Only add if more than this requiredViolation.
Definition CglStored.hpp:124
CglStored::CglStored
CglStored(int numberColumns=0)
Default constructor.
CglStored::CglStored
CglStored(const CglStored &rhs)
Copy constructor.
CglStored::getRequiredViolation
double getRequiredViolation() const
Get.
Definition CglStored.hpp:43
CglStored::tightLower
const double * tightLower() const
Tight lower bounds.
Definition CglStored.hpp:83
CglStored::cuts_
OsiCuts cuts_
Cuts.
Definition CglStored.hpp:128
CglStored::tightUpper
const double * tightUpper() const
Tight upper bounds.
Definition CglStored.hpp:88
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
CglTreeProbingInfo
Definition CglTreeInfo.hpp:92
cut
Definition Cgl012cut.hpp:153