Loading...
Searching...
No Matches
CglDuplicateRow.hpp
Go to the documentation of this file.
// $Id$
// Copyright (C) 2004, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef CglDuplicateRow_H
#define CglDuplicateRow_H
#include <string>
#include "CglCutGenerator.hpp"
class CglStored;
class CglDuplicateRow : public CglCutGenerator {
public:
virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
private:
void generateCuts12( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
void generateCuts4( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
void generateCuts8( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
public:
CglStored * outDuplicates( OsiSolverInterface * solver);
inline const int * duplicate() const
{ return duplicate_;}
inline int sizeDynamic() const
{ return sizeDynamic_;}
inline int numberOriginalRows() const
{ return matrix_.getNumRows();}
inline int logLevel() const
{ return logLevel_;}
inline void setLogLevel(int value)
{ logLevel_ = value;}
inline int maximumRhs() const
{ return maximumRhs_;}
inline void setMaximumRhs(int value)
{ maximumRhs_=value;}
inline int maximumDominated() const
{ return maximumDominated_;}
inline void setMaximumDominated(int value)
{ maximumDominated_=value;}
inline int mode() const
{ return mode_;}
inline void setMode(int value)
{ mode_=value;}
CglDuplicateRow ();
CglDuplicateRow (OsiSolverInterface * solver);
CglDuplicateRow (
const CglDuplicateRow & rhs);
virtual CglCutGenerator * clone() const;
CglDuplicateRow &
operator=(
const CglDuplicateRow& rhs);
virtual
~CglDuplicateRow ();
virtual std::string generateCpp( FILE * fp);
virtual void refreshSolver(OsiSolverInterface * solver);
protected:
// Protected member data
CoinPackedMatrix matrix_;
CoinPackedMatrix matrixByRow_;
int * rhs_;
int * duplicate_;
int * lower_;
CglStored * storedCuts_;
int maximumDominated_;
int maximumRhs_;
int sizeDynamic_;
int mode_;
int logLevel_;
};
#endif
CglCutGenerator.hpp
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglDuplicateRow::rhs_
int * rhs_
Possible rhs (if 0 then not possible).
Definition CglDuplicateRow.hpp:170
CglDuplicateRow::maximumDominated
int maximumDominated() const
Get.
Definition CglDuplicateRow.hpp:112
CglDuplicateRow::storedCuts_
CglStored * storedCuts_
Stored cuts if we found dominance cuts.
Definition CglDuplicateRow.hpp:176
CglDuplicateRow::duplicate_
int * duplicate_
Marks duplicate rows.
Definition CglDuplicateRow.hpp:172
CglDuplicateRow::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
CglDuplicateRow::logLevel
int logLevel() const
logLevel
Definition CglDuplicateRow.hpp:92
CglDuplicateRow::setMode
void setMode(int value)
Set mode.
Definition CglDuplicateRow.hpp:124
CglDuplicateRow::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Fix variables and find duplicate/dominated rows for the model of the solver interface,...
CglDuplicateRow::outDuplicates
CglStored * outDuplicates(OsiSolverInterface *solver)
Fix variables and find duplicate/dominated rows for the model of the solver interface,...
CglDuplicateRow::lower_
int * lower_
To allow for <= rows.
Definition CglDuplicateRow.hpp:174
CglDuplicateRow::maximumRhs_
int maximumRhs_
Check duplicates if effective rhs <= this.
Definition CglDuplicateRow.hpp:180
CglDuplicateRow::maximumRhs
int maximumRhs() const
Get.
Definition CglDuplicateRow.hpp:102
CglDuplicateRow::logLevel_
int logLevel_
Controls print out.
Definition CglDuplicateRow.hpp:186
CglDuplicateRow::matrixByRow_
CoinPackedMatrix matrixByRow_
Matrix by row.
Definition CglDuplicateRow.hpp:168
CglDuplicateRow::duplicate
const int * duplicate() const
Get duplicate row list, -1 means still in, -2 means out (all fixed), k>= means same as row k.
Definition CglDuplicateRow.hpp:79
CglDuplicateRow::sizeDynamic_
int sizeDynamic_
Size of dynamic program.
Definition CglDuplicateRow.hpp:182
CglDuplicateRow::CglDuplicateRow
CglDuplicateRow(OsiSolverInterface *solver)
Useful constructor.
CglDuplicateRow::generateCuts4
void generateCuts4(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for mode 4.
CglDuplicateRow::CglDuplicateRow
CglDuplicateRow()
Default constructor.
CglDuplicateRow::numberOriginalRows
int numberOriginalRows() const
Number of rows in original problem.
Definition CglDuplicateRow.hpp:85
CglDuplicateRow::sizeDynamic
int sizeDynamic() const
Size of dynamic program.
Definition CglDuplicateRow.hpp:82
CglDuplicateRow::~CglDuplicateRow
virtual ~CglDuplicateRow()
Destructor.
CglDuplicateRow::setMaximumRhs
void setMaximumRhs(int value)
Set.
Definition CglDuplicateRow.hpp:105
CglDuplicateRow::maximumDominated_
int maximumDominated_
Check dominated columns if less than this number of candidates.
Definition CglDuplicateRow.hpp:178
CglDuplicateRow::setLogLevel
void setLogLevel(int value)
Definition CglDuplicateRow.hpp:94
CglDuplicateRow::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglDuplicateRow::mode_
int mode_
1 do rows, 2 do columns, 3 do both
Definition CglDuplicateRow.hpp:184
CglDuplicateRow::clone
virtual CglCutGenerator * clone() const
Clone.
CglDuplicateRow::generateCuts8
void generateCuts8(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for mode 8.
CglDuplicateRow::operator=
CglDuplicateRow & operator=(const CglDuplicateRow &rhs)
Assignment operator.
CglDuplicateRow::setMaximumDominated
void setMaximumDominated(int value)
Set.
Definition CglDuplicateRow.hpp:115
CglDuplicateRow::CglDuplicateRow
CglDuplicateRow(const CglDuplicateRow &rhs)
Copy constructor.
CglDuplicateRow::generateCuts12
void generateCuts12(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for modes 1,2.
CglDuplicateRow::mode
int mode() const
Get mode.
Definition CglDuplicateRow.hpp:121
CglDuplicateRow::matrix_
CoinPackedMatrix matrix_
Matrix.
Definition CglDuplicateRow.hpp:166
CglStored
Stored Cut Generator Class.
Definition CglStored.hpp:16
CglTreeInfo
Information about where the cut generator is invoked from.
Definition CglTreeInfo.hpp:15