- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# 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.
double | optimalValue () const
| Return value of 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.
int | printOptimalSolution (const OsiSolverInterface &si) const
| Print optimal solution (returns -1 bad debug, 0 on optimal, 1 not).
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.
OsiRowCutDebugger & | operator= (const OsiRowCutDebugger &rhs)
| Assignment operator.
virtual | ~OsiRowCutDebugger ()
| Destructor.
## Private Attributes
Private member data
double | optimalValue_
| Value of optimal solution.
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.

References optimalSolution_.

int OsiRowCutDebugger::numberColumns | ( |  | ) | const`[inline]`

Return number of columns in optimal solution.

Definition at line 40 of file OsiRowCutDebugger.hpp.

References numberColumns_.

double OsiRowCutDebugger::optimalValue | ( |  | ) | const`[inline]`

Return value of optimal solution.

Definition at line 42 of file OsiRowCutDebugger.hpp.

References optimalValue_.

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.

int OsiRowCutDebugger::printOptimalSolution | ( | const OsiSolverInterface & | si | ) | const

Print optimal solution (returns -1 bad debug, 0 on optimal, 1 not).

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

double OsiRowCutDebugger::optimalValue_`[private]`

Value of optimal solution.

Definition at line 122 of file OsiRowCutDebugger.hpp.

Referenced by optimalValue().

int OsiRowCutDebugger::numberColumns_`[private]`

number of columns in problem

Definition at line 124 of file OsiRowCutDebugger.hpp.

Referenced by numberColumns().

bool* OsiRowCutDebugger::integerVariable_`[private]`

Whether integer or not.

Definition at line 126 of file OsiRowCutDebugger.hpp.

double* OsiRowCutDebugger::optimalSolution_`[private]`

Optimal column solution.

Definition at line 128 of file OsiRowCutDebugger.hpp.

Referenced by optimalSolution().

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

- /home/coin/SVN-release/Bcps-0.91.0/Osi/src/OsiRowCutDebugger.hpp