Loading...
Searching...
No Matches
CglLiftAndProject.hpp
Go to the documentation of this file.
// 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 CglLiftAndProject_H
#define CglLiftAndProject_H
#include <string>
#include "CglCutGenerator.hpp"
class CglLiftAndProject : public CglCutGenerator {
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
const std::string mpdDir );
public:
virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
double getBeta() const {
return beta_;
}
void setBeta(int oneOrMinusOne){
if (oneOrMinusOne==1 || oneOrMinusOne==-1){
beta_= static_cast<double>(oneOrMinusOne);
}
else {
throw CoinError("Unallowable value. Beta must be 1 or -1",
"cutGeneration","CglLiftAndProject");
}
}
CglLiftAndProject ();
CglLiftAndProject (
const CglLiftAndProject &);
virtual CglCutGenerator * clone() const;
CglLiftAndProject &
operator=(
const CglLiftAndProject& rhs);
virtual
~CglLiftAndProject ();
virtual std::string generateCpp( FILE * fp);
private:
// Private member methods
// Private member data
double beta_;
double epsilon_;
double onetol_;
};
//#############################################################################
void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
const std::string mpdDir );
#endif
CglCutGenerator.hpp
CglLiftAndProjectUnitTest
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglLiftAndProject::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglLiftAndProject::beta_
double beta_
The normalization is beta_=1 or beta_=-1.
Definition CglLiftAndProject.hpp:87
CglLiftAndProject::CglLiftAndProject
CglLiftAndProject()
Default constructor.
CglLiftAndProject::getBeta
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
Definition CglLiftAndProject.hpp:30
CglLiftAndProject::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate lift-and-project cuts for the model of the solver interface, si.
CglLiftAndProject::CglLiftAndProject
CglLiftAndProject(const CglLiftAndProject &)
Copy constructor.
CglLiftAndProject::operator=
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
CglLiftAndProject::setBeta
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
Definition CglLiftAndProject.hpp:37
CglLiftAndProject::clone
virtual CglCutGenerator * clone() const
Clone.
CglLiftAndProject::onetol_
double onetol_
1-epsilon
Definition CglLiftAndProject.hpp:91
CglLiftAndProject::CglLiftAndProjectUnitTest
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglLiftAndProject::epsilon_
double epsilon_
epsilon
Definition CglLiftAndProject.hpp:89
CglLiftAndProject::~CglLiftAndProject
virtual ~CglLiftAndProject()
Destructor.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition CglTreeInfo.hpp:15