OsiRowCutDebugger Class Reference

Validate Row Cut Generator. More...

#include <OsiRowCutDebugger.hpp>

List of all members.

Public Member Functions

Validate Row Cuts



virtual int validateCuts (const OsiCuts &cs, int first, int last) const
 If we are on the path to the optimal integer solution then check if any generated cuts cut off the optimal solution!
virtual bool invalidCut (const OsiRowCut &rowcut) const
 check one cut. Return true if cut is invalid
const double * optimalSolution () const
 Return optimal solution.
int numberColumns () const
 Return number of columns in optimal solution.
Activate Debugger



bool activate (const OsiSolverInterface &si, const char *model)
 Activate debugger using name of model.
bool activate (const OsiSolverInterface &si, const double *solution)
 Activate debugger using full solution array.
void redoSolution (int numberColumns, const int *originalColumns)
 Redo solution after preprocessing.
Test if on Optimal Path



bool onOptimalPath (const OsiSolverInterface &si) const
 Returns whether still on optimal path.
Test if debugger active



bool active () const
 Returns true if debugger is active.
Constructors and destructors



 OsiRowCutDebugger ()
 Default constructor - no checking.
 OsiRowCutDebugger (const OsiSolverInterface &si, const char *model)
 Constructor with name of model.
 OsiRowCutDebugger (const OsiSolverInterface &si, const double *solution)
 Default constructor - no checking.
 OsiRowCutDebugger (const OsiRowCutDebugger &)
 Copy constructor.
OsiRowCutDebuggeroperator= (const OsiRowCutDebugger &rhs)
 Assignment operator.
virtual ~OsiRowCutDebugger ()
 Destructor.

Private Attributes

Private member data



int numberColumns_
 number of columns in problem
bool * integerVariable_
 Whether integer or not.
double * optimalSolution_
 Optimal column solution.

Friends

void OsiRowCutDebuggerUnitTest (const OsiSolverInterface *siP, const std::string &mpsDir)
 A function that tests the methods in the OsiRowCut class.

Detailed Description

Validate Row Cut Generator.

Definition at line 12 of file OsiRowCutDebugger.hpp.


Constructor & Destructor Documentation

OsiRowCutDebugger::OsiRowCutDebugger (  ) 

Default constructor - no checking.

OsiRowCutDebugger::OsiRowCutDebugger ( const OsiSolverInterface si,
const char *  model 
)

Constructor with name of model.

It may or may not work if problem presolved

OsiRowCutDebugger::OsiRowCutDebugger ( const OsiSolverInterface si,
const double *  solution 
)

Default constructor - no checking.

OsiRowCutDebugger::OsiRowCutDebugger ( const OsiRowCutDebugger  ) 

Copy constructor.

virtual OsiRowCutDebugger::~OsiRowCutDebugger (  )  [virtual]

Destructor.


Member Function Documentation

virtual int OsiRowCutDebugger::validateCuts ( const OsiCuts cs,
int  first,
int  last 
) const [virtual]

If we are on the path to the optimal integer solution then check if any generated cuts cut off the optimal solution!

If so then print offending cuts and return non-zero code

Up to user to check if on optimalPath (using function of same name). This is normally handled by rowCutDebugger() in OsiSolverInterface.

Return number of invalid cuts.

virtual bool OsiRowCutDebugger::invalidCut ( const OsiRowCut rowcut  )  const [virtual]

check one cut. Return true if cut is invalid

const double* OsiRowCutDebugger::optimalSolution (  )  const [inline]

Return optimal solution.

Definition at line 36 of file OsiRowCutDebugger.hpp.

int OsiRowCutDebugger::numberColumns (  )  const [inline]

Return number of columns in optimal solution.

Definition at line 40 of file OsiRowCutDebugger.hpp.

bool OsiRowCutDebugger::activate ( const OsiSolverInterface si,
const char *  model 
)

Activate debugger using name of model.

It may or may not work if problem presolved. Returns true if debugger activated.

bool OsiRowCutDebugger::activate ( const OsiSolverInterface si,
const double *  solution 
)

Activate debugger using full solution array.

Only integer values need to be correct. Up to user to get it correct. Returns true if debugger activated (i.e. solution was valid).

void OsiRowCutDebugger::redoSolution ( int  numberColumns,
const int *  originalColumns 
)

Redo solution after preprocessing.

bool OsiRowCutDebugger::onOptimalPath ( const OsiSolverInterface si  )  const

Returns whether still on optimal path.

This should normally be invoked from OsiSolverInterface::rowCutDebugger()

bool OsiRowCutDebugger::active (  )  const

Returns true if debugger is active.

OsiRowCutDebugger& OsiRowCutDebugger::operator= ( const OsiRowCutDebugger rhs  ) 

Assignment operator.


Friends And Related Function Documentation

void OsiRowCutDebuggerUnitTest ( const OsiSolverInterface siP,
const std::string &  mpsDir 
) [friend]

A function that tests the methods in the OsiRowCut class.

The only reason for it not to be a member method is that this way it doesn't have to be compiled into the library. And that's a gain, because the library should be compiled with optimization on, but this method should be compiled with debugging.


Member Data Documentation

number of columns in problem

Definition at line 117 of file OsiRowCutDebugger.hpp.

Whether integer or not.

Definition at line 119 of file OsiRowCutDebugger.hpp.

Optimal column solution.

Definition at line 121 of file OsiRowCutDebugger.hpp.


The documentation for this class was generated from the following file:

Generated on 15 Mar 2015 for Coin-All by  doxygen 1.6.1