Osi 0.107.7

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OsiRowCutDebugger.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4
5 #ifndef OsiRowCutDebugger_H
6 #define OsiRowCutDebugger_H
7
14 #include <string>
15
16 #include "OsiCuts.hpp"
17 #include "OsiSolverInterface.hpp"
18
42 class OsiRowCutDebugger {
43 friend void OsiRowCutDebuggerUnitTest(const OsiSolverInterface * siP,
44 const std::string & mpsDir);
45
46 public:
47
59 virtual int validateCuts(const OsiCuts & cs, int first, int last) const;
60
66 virtual bool invalidCut(const OsiRowCut & rowcut) const;
67
74 bool onOptimalPath(const OsiSolverInterface &si) const;
76
88 bool activate(const OsiSolverInterface &si, const char *model) ;
89
101 bool activate(const OsiSolverInterface &si, const double* solution,
102 bool keepContinuous = false) ;
103
105 bool active() const;
107
110 inline const double * optimalSolution() const
112 { return knownSolution_;}
113
115 inline int numberColumns() const { return (numberColumns_) ; }
116
118 inline double optimalValue() const { return knownValue_;}
119
130 void redoSolution(int numberColumns, const int *originalColumns);
131
133 int printOptimalSolution(const OsiSolverInterface & si) const;
135
138 OsiRowCutDebugger ();
140
145 OsiRowCutDebugger(const OsiSolverInterface &si, const char *model) ;
146
151 OsiRowCutDebugger(const OsiSolverInterface &si, const double *solution,
152 bool enforceOptimality = false) ;
153
155 OsiRowCutDebugger(const OsiRowCutDebugger &);
156
158 OsiRowCutDebugger& operator=(const OsiRowCutDebugger& rhs);
159
161 virtual ~OsiRowCutDebugger ();
163
164 private:
165
166 // Private member data
167
170 double knownValue_;
172
177 int numberColumns_;
178
180 bool * integerVariable_;
181
183 double * knownSolution_;
185 };
186
187 #endif
OsiRowCutDebugger::redoSolution
void redoSolution(int numberColumns, const int *originalColumns)
Edit the known solution to reflect column changes.
OsiRowCutDebugger::~OsiRowCutDebugger
virtual ~OsiRowCutDebugger()
Destructor.
OsiRowCutDebugger::active
bool active() const
Returns true if the debugger is active.
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
OsiRowCutDebugger::validateCuts
virtual int validateCuts(const OsiCuts &cs, int first, int last) const
Check that the set of cuts does not cut off the solution known to the debugger.
OsiRowCutDebugger::onOptimalPath
bool onOptimalPath(const OsiSolverInterface &si) const
Returns true if the solution held in the solver is compatible with the known solution.
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
OsiRowCutDebugger::numberColumns
int numberColumns() const
Return the number of columns in the known solution.
Definition: OsiRowCutDebugger.hpp:115
OsiRowCutDebugger::invalidCut
virtual bool invalidCut(const OsiRowCut &rowcut) const
Check that the cut does not cut off the solution known to the debugger.
OsiRowCutDebugger::optimalValue
double optimalValue() const
Return the value of the objective for the known solution.
Definition: OsiRowCutDebugger.hpp:118
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
OsiSolverInterface.hpp
OsiRowCutDebugger::OsiRowCutDebuggerUnitTest
friend void OsiRowCutDebuggerUnitTest(const OsiSolverInterface *siP, const std::string &mpsDir)
A function that tests the methods in the OsiRowCutDebugger class.
OsiRowCutDebugger::integerVariable_
bool * integerVariable_
array specifying integer variables
Definition: OsiRowCutDebugger.hpp:180
OsiRowCutDebugger::optimalSolution
const double * optimalSolution() const
Return the known solution.
Definition: OsiRowCutDebugger.hpp:111
OsiRowCutDebugger::activate
bool activate(const OsiSolverInterface &si, const char *model)
Activate a debugger using the name of a problem.
OsiCuts.hpp
OsiRowCutDebugger
Validate cuts against a known solution.
Definition: OsiRowCutDebugger.hpp:42
OsiRowCutDebugger::knownSolution_
double * knownSolution_
array specifying known solution
Definition: OsiRowCutDebugger.hpp:183
OsiRowCutDebugger::operator=
OsiRowCutDebugger & operator=(const OsiRowCutDebugger &rhs)
Assignment operator.
OsiRowCutDebugger::OsiRowCutDebugger
OsiRowCutDebugger()
Default constructor - no checking.
OsiRowCutDebugger::numberColumns_
int numberColumns_
Number of columns in known solution.
Definition: OsiRowCutDebugger.hpp:177
OsiRowCutDebugger::printOptimalSolution
int printOptimalSolution(const OsiSolverInterface &si) const
Print optimal solution (returns -1 bad debug, 0 on optimal, 1 not)
OsiRowCutDebugger::knownValue_
double knownValue_
Value of known solution.
Definition: OsiRowCutDebugger.hpp:171