DippyDecompApp Class Reference

#include <DippyDecompApp.h>

Inheritance diagram for DippyDecompApp:
Inheritance graph
[legend]
Collaboration diagram for DippyDecompApp:
Collaboration graph
[legend]

List of all members.

Private Attributes

const string m_classTag
 Class id tag (for log / debugging).
PyObject * m_pProb
 The various model constraint systems used for different algos.
int m_numCols
bool m_pySolveRelaxed
 Flags for Python callbacks.
bool m_pyIsUserFeasible
bool m_pyGenerateCuts
bool m_pyHeuristics
bool m_pyInitVars

Helper functions (public).



PyObject * m_rowList
map< PyObject *, int > m_rowIndices
PyObject * m_colList
map< PyObject *, int > m_colIndices
PyObject * m_relaxedKeys
map< PyObject *, int > m_relaxIndices
void addPuLPProb (PyObject *p)
void createModels ()
 Create model parts.
virtual DecompSolverStatus solveRelaxed (const int whichBlock, const double *redCostX, const double convexDual, DecompVarList &varList)
 Initialize the dual vector for PhaseII of PC.
bool APPisUserFeasible (const double *x, const int n_cols, const double tolZero)
 Method to determine if the solution (x) is feasible to the original model.
virtual int generateCuts (const double *x, DecompCutList &newCuts)
 Initialize the dual vector for PhaseII of PC.
int APPheuristics (const double *xhat, const double *origCost, vector< DecompSolution * > &xhatIPFeas)
int generateInitVars (DecompVarList &initVars)
 Initialize the dual vector for PhaseII of PC.
 DippyDecompApp (UtilParameters &utilParam, PyObject *p)
virtual ~DippyDecompApp ()

Detailed Description

A DecompApp that links Python to DIP.

See also:
DecompApp

Definition at line 25 of file DippyDecompApp.h.


Constructor & Destructor Documentation

DippyDecompApp::DippyDecompApp ( UtilParameters utilParam,
PyObject *  p 
) [inline]
virtual DippyDecompApp::~DippyDecompApp (  )  [inline, virtual]

Member Function Documentation

void DippyDecompApp::addPuLPProb ( PyObject *  p  )  [inline]

Definition at line 48 of file DippyDecompApp.h.

References m_pProb.

Referenced by DippyDecompApp().

void DippyDecompApp::createModels (  ) 

Create model parts.

Reimplemented from DecompApp.

Referenced by DippyDecompApp().

virtual DecompSolverStatus DippyDecompApp::solveRelaxed ( const int  whichBlock,
const double *  redCostX,
const double  target,
DecompVarList varList 
) [virtual]

Initialize the dual vector for PhaseII of PC.

The user is passed a reference to the internal data and can manipulate it directly.

This is only called when dual stabilization is used, i.e., when m_param.DualStab > 0, at the first iteration of PhaseII of PC. The vector is immediately smoothed with the initial restricted master duals. By default, the restricted mater is used as the initial dual and, therefore, no smoothing occurs in the first iteration.

Reimplemented from DecompApp.

bool DippyDecompApp::APPisUserFeasible ( const double *  x,
const int  numCols,
const double  tolZero 
) [virtual]

Method to determine if the solution (x) is feasible to the original model.

For explicitly defined model components, like the model core constraints (A''), the feasibility of the solution is automatically checked against the constraints. In the case when the relaxed problem constraints (A') are explicitly defined - these are also checked automatically.

However, for some applications, a valid feasible constraint system cannot be explicitly defined (even for the core set of constraints). For example, think of the case of TSP, where A'' is defined as the subtour elimination constraints. These constraints are implicitly defined by deriving the method DecompApp::generateCuts. Therefore, the framework cannot automatically tell if a solution is feasible by checking against the constraint system. In this case, the user must provide this method.

Parameters:
[in] x The solution point to check.
Returns:
True, if x is feasible; otherwise, false.

Reimplemented from DecompApp.

virtual int DippyDecompApp::generateCuts ( const double *  x,
DecompCutList newCuts 
) [virtual]

Initialize the dual vector for PhaseII of PC.

The user is passed a reference to the internal data and can manipulate it directly.

This is only called when dual stabilization is used, i.e., when m_param.DualStab > 0, at the first iteration of PhaseII of PC. The vector is immediately smoothed with the initial restricted master duals. By default, the restricted mater is used as the initial dual and, therefore, no smoothing occurs in the first iteration.

Reimplemented from DecompApp.

int DippyDecompApp::APPheuristics ( const double *  xhat,
const double *  origCost,
vector< DecompSolution * > &  xhatIPFeas 
)
int DippyDecompApp::generateInitVars ( DecompVarList initVars  )  [virtual]

Initialize the dual vector for PhaseII of PC.

The user is passed a reference to the internal data and can manipulate it directly.

This is only called when dual stabilization is used, i.e., when m_param.DualStab > 0, at the first iteration of PhaseII of PC. The vector is immediately smoothed with the initial restricted master duals. By default, the restricted mater is used as the initial dual and, therefore, no smoothing occurs in the first iteration.

Reimplemented from DecompApp.


Member Data Documentation

const string DippyDecompApp::m_classTag [private]

Class id tag (for log / debugging).

Reimplemented from DecompApp.

Definition at line 28 of file DippyDecompApp.h.

PyObject* DippyDecompApp::m_pProb [private]

The various model constraint systems used for different algos.

Definition at line 32 of file DippyDecompApp.h.

Referenced by addPuLPProb(), and ~DippyDecompApp().

Definition at line 34 of file DippyDecompApp.h.

Flags for Python callbacks.

Definition at line 37 of file DippyDecompApp.h.

Referenced by DippyDecompApp().

Definition at line 38 of file DippyDecompApp.h.

Referenced by DippyDecompApp().

Definition at line 39 of file DippyDecompApp.h.

Referenced by DippyDecompApp().

Definition at line 40 of file DippyDecompApp.h.

Referenced by DippyDecompApp().

Definition at line 41 of file DippyDecompApp.h.

Referenced by DippyDecompApp().

Definition at line 70 of file DippyDecompApp.h.

Referenced by ~DippyDecompApp().

map<PyObject*, int> DippyDecompApp::m_rowIndices

Definition at line 71 of file DippyDecompApp.h.

Definition at line 72 of file DippyDecompApp.h.

Referenced by ~DippyDecompApp().

map<PyObject*, int> DippyDecompApp::m_colIndices

Definition at line 73 of file DippyDecompApp.h.

Definition at line 75 of file DippyDecompApp.h.

Referenced by ~DippyDecompApp().

map<PyObject*, int> DippyDecompApp::m_relaxIndices

Definition at line 76 of file DippyDecompApp.h.


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

Generated on 12 Feb 2015 for Dip-All by  doxygen 1.6.1