1 #ifndef DIPPY_DECOMPAPP_INCLUDED
2 #define DIPPY_DECOMPAPP_INCLUDED
7 #include "UtilParameters.h"
58 const double* redCostX,
59 const double convexDual,
62 bool APPisUserFeasible(
const double* x,
const int n_cols,
const double tolZero);
64 virtual int generateCuts(
const double* x,
DecompCutList& newCuts);
66 int APPheuristics(
const double* xhat,
const double* origCost, vector<DecompSolution*>& xhatIPFeas);
81 m_classTag (
"SMALL-APP"),
85 m_pySolveRelaxed = utilParam.
GetSetting(
"pyRelaxedSolver",
true);
86 m_pyIsUserFeasible = utilParam.
GetSetting(
"pyIsSolutionFeasible",
true);
87 m_pyGenerateCuts = utilParam.
GetSetting(
"pyGenerateCuts",
true);
88 m_pyHeuristics = utilParam.
GetSetting(
"pyHeuristics",
true);
89 m_pyInitVars = utilParam.
GetSetting(
"pyInitVars",
true);
95 Py_XDECREF(m_rowList);
96 Py_XDECREF(m_colList);
97 Py_XDECREF(m_relaxedKeys);
98 delete [] m_objective;
100 delete m_modelCore.getModel();
101 m_modelCore.setModel(NULL);
102 map<int, DecompModel >::iterator mit;
104 for (mit = m_modelRelax.begin(); mit != m_modelRelax.end(); mit++) {
std::list< DecompCut * > DecompCutList
DecompConstraintSet * getModel() const
map< PyObject *, int > m_colIndices
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
PyObject * m_pProb
The various model constraint systems used for different algos.
bool m_pySolveRelaxed
Flags for Python callbacks.
DippyDecompApp(UtilParameters &utilParam, PyObject *p)
map< PyObject *, int > m_relaxIndices
map< PyObject *, int > m_rowIndices
void setModel(DecompConstraintSet *model)
void addPuLPProb(PyObject *p)
const string m_classTag
Class id tag (for log / debugging).
virtual ~DippyDecompApp()
std::list< DecompVar * > DecompVarList
The main application class.