Loading...
Searching...
No Matches
CglAllDifferent.hpp
Go to the documentation of this file.
// 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 CglAllDifferent_H
#define CglAllDifferent_H
#include <string>
#include "CglCutGenerator.hpp"
class CglAllDifferent : public CglCutGenerator {
public:
virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
CglAllDifferent ();
CglAllDifferent(int numberSets, const int * starts, const int * which);
CglAllDifferent (
const CglAllDifferent &);
virtual CglCutGenerator * clone() const;
CglAllDifferent &
operator=(
const CglAllDifferent& rhs);
virtual
~CglAllDifferent ();
virtual std::string generateCpp( FILE * fp);
virtual void refreshSolver(OsiSolverInterface * solver);
virtual bool mayGenerateRowCutsInTree() const
{ return false;}
inline void setLogLevel(int value)
{ logLevel_=value;}
inline int getLogLevel() const
{ return logLevel_;}
inline void setMaxLook(int value)
{ maxLook_=value;}
inline int getMaxLook() const
{ return maxLook_;}
private:
// Private member methods
// Private member data
int numberSets_;
int numberDifferent_;
int maxLook_;
int logLevel_;
int * start_;
int * which_;
int * originalWhich_;
};
#endif
CglCutGenerator.hpp
CglAllDifferent::~CglAllDifferent
virtual ~CglAllDifferent()
Destructor.
CglAllDifferent::start_
int * start_
Start of each set.
Definition CglAllDifferent.hpp:108
CglAllDifferent::originalWhich_
int * originalWhich_
Original members.
Definition CglAllDifferent.hpp:112
CglAllDifferent::numberSets_
int numberSets_
Number of sets.
Definition CglAllDifferent.hpp:100
CglAllDifferent::operator=
CglAllDifferent & operator=(const CglAllDifferent &rhs)
Assignment operator.
CglAllDifferent::maxLook_
int maxLook_
Maximum number of sets to look at at once.
Definition CglAllDifferent.hpp:104
CglAllDifferent::getMaxLook
int getMaxLook() const
Get Maximum number of sets to look at at once.
Definition CglAllDifferent.hpp:84
CglAllDifferent::setLogLevel
void setLogLevel(int value)
Set log level.
Definition CglAllDifferent.hpp:75
CglAllDifferent::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
CglAllDifferent::numberDifferent_
int numberDifferent_
Total number of variables in all different sets.
Definition CglAllDifferent.hpp:102
CglAllDifferent::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
This fixes (or reduces bounds) on sets of all different variables.
CglAllDifferent::getLogLevel
int getLogLevel() const
Get log level.
Definition CglAllDifferent.hpp:78
CglAllDifferent::CglAllDifferent
CglAllDifferent(int numberSets, const int *starts, const int *which)
Useful constructot.
CglAllDifferent::which_
int * which_
Members (0,1,....) not as in original model.
Definition CglAllDifferent.hpp:110
CglAllDifferent::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglAllDifferent::logLevel_
int logLevel_
Log level - 0 none, 1 - a bit, 2 - more details.
Definition CglAllDifferent.hpp:106
CglAllDifferent::mayGenerateRowCutsInTree
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
Definition CglAllDifferent.hpp:69
CglAllDifferent::CglAllDifferent
CglAllDifferent()
Default constructor.
CglAllDifferent::setMaxLook
void setMaxLook(int value)
Set Maximum number of sets to look at at once.
Definition CglAllDifferent.hpp:81
CglAllDifferent::CglAllDifferent
CglAllDifferent(const CglAllDifferent &)
Copy constructor.
CglAllDifferent::clone
virtual CglCutGenerator * clone() const
Clone.
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition CglTreeInfo.hpp:15