Loading...
Searching...
No Matches
CglOddHole.hpp
Go to the documentation of this file.
// $Id$
// Copyright (C) 2000, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef CglOddHole_H
#define CglOddHole_H
#include <string>
#include "CglCutGenerator.hpp"
class CglOddHole : public CglCutGenerator {
friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
const std::string mpdDir );
public:
virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
void createRowList( const OsiSolverInterface & si,
const int * possible=NULL);
void createRowList(int numberRows, const int * whichRow);
void createCliqueList(int numberCliques, const int * cliqueStart,
const int * cliqueMember);
int numberPossible();
double getMinimumViolation() const;
void setMinimumViolation(double value);
double getMinimumViolationPer() const;
void setMinimumViolationPer(double value);
int getMaximumEntries() const;
void setMaximumEntries(int value);
CglOddHole ();
CglOddHole (
const CglOddHole &);
virtual CglCutGenerator * clone() const;
CglOddHole &
operator=(
const CglOddHole& rhs);
virtual
~CglOddHole ();
virtual void refreshSolver(OsiSolverInterface * solver);
private:
// Private member methods
void generateCuts(const OsiRowCutDebugger * debugger,
const CoinPackedMatrix & rowCopy,
const double * solution, const double * dj,
OsiCuts & cs, const int * suitableRow,
const int * fixedColumn,const CglTreeInfo info,
bool packed);
// Private member data
int * suitableRows_;
int * startClique_;
int * member_;
double epsilon_;
double onetol_;
double minimumViolation_;
double minimumViolationPer_;
int maximumEntries_;
int numberRows_;
int numberCliques_;
};
//#############################################################################
void CglOddHoleUnitTest(const OsiSolverInterface * siP,
const std::string mpdDir );
#endif
CglCutGenerator.hpp
CglOddHoleUnitTest
void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglOddHole::createCliqueList
void createCliqueList(int numberCliques, const int *cliqueStart, const int *cliqueMember)
Create a list of extra row cliques which may not be in matrix At present these are classical cliques.
CglOddHole::setMinimumViolation
void setMinimumViolation(double value)
CglOddHole::clone
virtual CglCutGenerator * clone() const
Clone.
CglOddHole::createRowList
void createRowList(const OsiSolverInterface &si, const int *possible=NULL)
Create a list of rows which might yield cuts this is to speed up process The possible parameter is a ...
CglOddHole::createRowList
void createRowList(int numberRows, const int *whichRow)
This version passes in a list - 1 marks possible.
CglOddHole::minimumViolation_
double minimumViolation_
Minimum violation.
Definition CglOddHole.hpp:139
CglOddHole::getMinimumViolationPer
double getMinimumViolationPer() const
Minimum violation per entry.
CglOddHole::setMaximumEntries
void setMaximumEntries(int value)
CglOddHole::setMinimumViolationPer
void setMinimumViolationPer(double value)
CglOddHole::CglOddHole
CglOddHole(const CglOddHole &)
Copy constructor.
CglOddHole::onetol_
double onetol_
1-epsilon
Definition CglOddHole.hpp:137
CglOddHole::member_
int * member_
clique members
Definition CglOddHole.hpp:133
CglOddHole::operator=
CglOddHole & operator=(const CglOddHole &rhs)
Assignment operator.
CglOddHole::CglOddHole
CglOddHole()
Default constructor.
CglOddHole::suitableRows_
int * suitableRows_
list of suitableRows
Definition CglOddHole.hpp:129
CglOddHole::epsilon_
double epsilon_
epsilon
Definition CglOddHole.hpp:135
CglOddHole::startClique_
int * startClique_
start of each clique
Definition CglOddHole.hpp:131
CglOddHole::getMinimumViolation
double getMinimumViolation() const
Minimum violation.
CglOddHole::~CglOddHole
virtual ~CglOddHole()
Destructor.
CglOddHole::getMaximumEntries
int getMaximumEntries() const
Maximum number of entries in a cut.
CglOddHole::numberCliques_
int numberCliques_
number of cliques
Definition CglOddHole.hpp:147
CglOddHole::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate odd hole cuts for the model of the solver interface, si.
CglOddHole::minimumViolationPer_
double minimumViolationPer_
Minimum violation per entry.
Definition CglOddHole.hpp:141
CglOddHole::numberPossible
int numberPossible()
Returns how many rows might give odd hole cuts.
CglOddHole::CglOddHoleUnitTest
friend void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
CglOddHole::generateCuts
void generateCuts(const OsiRowCutDebugger *debugger, const CoinPackedMatrix &rowCopy, const double *solution, const double *dj, OsiCuts &cs, const int *suitableRow, const int *fixedColumn, const CglTreeInfo info, bool packed)
Generate cuts from matrix copy and solution If packed true then <=1 rows, otherwise >=1 rows.
CglOddHole::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
CglOddHole::maximumEntries_
int maximumEntries_
Maximum number of entries in a cut.
Definition CglOddHole.hpp:143
CglOddHole::numberRows_
int numberRows_
number of rows when suitability tested
Definition CglOddHole.hpp:145
CglTreeInfo
Information about where the cut generator is invoked from.
Definition CglTreeInfo.hpp:15