Loading...
Searching...
No Matches
CglZeroHalf.hpp
Go to the documentation of this file.
// $Id$
// Copyright (C) 2010, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef CglZeroHalf_H
#define CglZeroHalf_H
#include <string>
#include "CglCutGenerator.hpp"
#include "CoinPackedMatrix.hpp"
#include "Cgl012cut.hpp"
class CglZeroHalf : public CglCutGenerator {
friend void CglZeroHalfUnitTest(const OsiSolverInterface * siP,
const std::string mpdDir );
public:
virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
const CglTreeInfo info = CglTreeInfo());
inline int getFlags() const
{ return flags_;}
inline void setFlags(int value)
{ flags_ = value;}
CglZeroHalf ();
CglZeroHalf (
const CglZeroHalf &);
virtual CglCutGenerator * clone() const;
CglZeroHalf &
operator=(
const CglZeroHalf& rhs);
virtual
~CglZeroHalf ();
virtual std::string generateCpp( FILE * fp);
virtual void refreshSolver(OsiSolverInterface * solver);
private:
// Private member methods
int mr_;
int mc_;
int mnz_;
int *mtbeg_;
int *mtcnt_;
int *mtind_;
int *mtval_;
int *vlb_;
int *vub_;
int *mrhs_;
char *msense_;
Cgl012Cut cutInfo_;
int flags_;
};
#ifndef CGL_NEW_SHORT
void cglShortestPath(cgl_graph * graph, int source, int maximumLength);
#else
void cglShortestPath(auxiliary_graph * graph, int source, int maximumLength);
#endif
//#############################################################################
void CglZeroHalfUnitTest(const OsiSolverInterface * siP,
const std::string mpdDir );
#endif
Cgl012cut.hpp
CglCutGenerator.hpp
cglShortestPath
void cglShortestPath(auxiliary_graph *graph, int source, int maximumLength)
A simple Dijkstra shortest path - make better later.
CglZeroHalfUnitTest
void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
Cgl012Cut
012Cut Generator Class
Definition Cgl012cut.hpp:207
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition CglTreeInfo.hpp:15
CglZeroHalf::mtcnt_
int * mtcnt_
number of entries of each row in arrays mtind and mtval
Definition CglZeroHalf.hpp:97
CglZeroHalf::~CglZeroHalf
virtual ~CglZeroHalf()
Destructor.
CglZeroHalf::getFlags
int getFlags() const
Get flags.
Definition CglZeroHalf.hpp:44
CglZeroHalf::operator=
CglZeroHalf & operator=(const CglZeroHalf &rhs)
Assignment operator.
CglZeroHalf::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate zero half cuts for the model accessed through the solver interface.
CglZeroHalf::msense_
char * msense_
senses of the constraints: 'L', 'G' or 'E'
Definition CglZeroHalf.hpp:109
CglZeroHalf::flags_
int flags_
Flags 1 bit - global cuts.
Definition CglZeroHalf.hpp:115
CglZeroHalf::vub_
int * vub_
upper bounds on the variables
Definition CglZeroHalf.hpp:105
CglZeroHalf::cutInfo_
Cgl012Cut cutInfo_
Cgl012Cut object to make thread safe.
Definition CglZeroHalf.hpp:111
CglZeroHalf::CglZeroHalf
CglZeroHalf(const CglZeroHalf &)
Copy constructor.
CglZeroHalf::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglZeroHalf::mtind_
int * mtind_
column indices of the nonzero entries of the ILP matrix
Definition CglZeroHalf.hpp:99
CglZeroHalf::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
CglZeroHalf::CglZeroHalfUnitTest
friend void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
CglZeroHalf::clone
virtual CglCutGenerator * clone() const
Clone.
CglZeroHalf::mc_
int mc_
number of columns in the ILP matrix
Definition CglZeroHalf.hpp:91
CglZeroHalf::setFlags
void setFlags(int value)
Set flags.
Definition CglZeroHalf.hpp:47
CglZeroHalf::mtval_
int * mtval_
values of the nonzero entries of the ILP matrix
Definition CglZeroHalf.hpp:101
CglZeroHalf::vlb_
int * vlb_
lower bounds on the variables
Definition CglZeroHalf.hpp:103
CglZeroHalf::mtbeg_
int * mtbeg_
starting position of each row in arrays mtind and mtval
Definition CglZeroHalf.hpp:95
CglZeroHalf::mr_
int mr_
number of rows in the ILP matrix
Definition CglZeroHalf.hpp:89
CglZeroHalf::mnz_
int mnz_
number of nonzero's in the ILP matrix
Definition CglZeroHalf.hpp:93
CglZeroHalf::mrhs_
int * mrhs_
right hand sides of the constraints
Definition CglZeroHalf.hpp:107
CglZeroHalf::CglZeroHalf
CglZeroHalf()
Default constructor.
auxiliary_graph
Definition Cgl012cut.hpp:129
cgl_graph
Definition Cgl012cut.hpp:50