#include <ATM_DecompApp.h>
Public Member Functions | |
virtual bool | APPisUserFeasible (const double *x, const int nCols, const double tolZero) |
Method to determine if the solution (x) is feasible to the original model. | |
Helper functions (public). | |
void | initializeApp (UtilParameters &utilParam) |
Initialize application. | |
void | createModels () |
Initialize application. | |
int | createConZtoX (DecompConstraintSet *model, const int atmIndex) |
Initialize application. | |
int | createConPickOne (DecompConstraintSet *model, const int atmIndex) |
Initialize application. | |
int | createConCount (DecompConstraintSet *model, const int atmIndex) |
Initialize application. | |
DecompConstraintSet * | createModelCore1 (bool includeCount=true) |
Initialize application. | |
DecompConstraintSet * | createModelRelax1 (const int a, bool includeCount=true) |
Initialize application. | |
DecompConstraintSet * | createModelCore2 () |
Initialize application. | |
DecompConstraintSet * | createModelRelax2 (const int d) |
Initialize application. | |
DecompConstraintSet * | createModelCoreCount () |
Initialize application. | |
DecompConstraintSet * | createModelRelaxCount () |
Initialize application. | |
const int | numCoreCols () const |
Initialize application. | |
const int | getNAtmsSteps () const |
Initialize application. | |
void | createModelColumns (DecompConstraintSet *model, const int atmIndex=-1, const int dateIndex=-1) |
Initialize application. | |
const int | getColOffset_x1 () const |
Initialize application. | |
const int | getColOffset_z () const |
Initialize application. | |
const int | getColOffset_fp () const |
Initialize application. | |
const int | getColOffset_fm () const |
Initialize application. | |
const int | getColOffset_x2 () const |
Initialize application. | |
const int | getColOffset_x3 () const |
Initialize application. | |
const int | getColOffset_v () const |
Initialize application. | |
const int | colIndex_x1 (const int a, const int t) const |
Initialize application. | |
const int | colIndex_z (const int a, const int t) const |
Initialize application. | |
const int | colIndex_fp (const int pairIndex) const |
Initialize application. | |
const int | colIndex_fm (const int pairIndex) const |
Initialize application. | |
const int | colIndex_x2 (const int a) const |
Initialize application. | |
const int | colIndex_x3 (const int a) const |
Initialize application. | |
const int | colIndex_v (const int pairIndex) const |
Initialize application. | |
void | addColumnNamesA (DecompConstraintSet *model, const string prefix, const int offset) |
Initialize application. | |
void | addColumnNamesAT (DecompConstraintSet *model, const string prefix, const int offset) |
Initialize application. | |
void | addColumnNamesAD (DecompConstraintSet *model, const string prefix, const int offset) |
Initialize application. | |
Constructor and Destructor | |
ATM_DecompApp (UtilParameters &utilParam) | |
Default constructor. | |
virtual | ~ATM_DecompApp () |
Default constructor. | |
Private Attributes | |
const string | m_classTag |
Class id tag (for log / debugging). | |
ATM_Instance | m_instance |
ATM problem instance data. | |
ATM_Param | m_appParam |
Application specific parameters. | |
double * | m_objective |
The model objective coefficients (original space). | |
vector< DecompConstraintSet * > | m_models |
The various model constraint systems used for different algos. |
A DecompApp for solving the ATM Cash Management Problem (ATM).
Definition at line 35 of file ATM_DecompApp.h.
ATM_DecompApp::ATM_DecompApp | ( | UtilParameters & | utilParam | ) | [inline] |
Default constructor.
Takes an instance of UtilParameters
Definition at line 189 of file ATM_DecompApp.h.
References initializeApp().
virtual ATM_DecompApp::~ATM_DecompApp | ( | ) | [inline, virtual] |
Default constructor.
Takes an instance of UtilParameters
Definition at line 197 of file ATM_DecompApp.h.
References m_models, and UtilDeleteVectorPtr().
virtual bool ATM_DecompApp::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.
[in] | x | The solution point to check. |
[in] | numCols | The number of variables. |
[in] | tolZero | The integrality tolerance (currently ignored). |
Reimplemented from DecompApp.
void ATM_DecompApp::initializeApp | ( | UtilParameters & | utilParam | ) | [virtual] |
void ATM_DecompApp::createModels | ( | ) |
Initialize application.
Reimplemented from DecompApp.
int ATM_DecompApp::createConZtoX | ( | DecompConstraintSet * | model, | |
const int | atmIndex | |||
) |
Initialize application.
int ATM_DecompApp::createConPickOne | ( | DecompConstraintSet * | model, | |
const int | atmIndex | |||
) |
Initialize application.
int ATM_DecompApp::createConCount | ( | DecompConstraintSet * | model, | |
const int | atmIndex | |||
) |
Initialize application.
DecompConstraintSet* ATM_DecompApp::createModelCore1 | ( | bool | includeCount = true |
) |
Initialize application.
DecompConstraintSet* ATM_DecompApp::createModelRelax1 | ( | const int | a, | |
bool | includeCount = true | |||
) |
Initialize application.
DecompConstraintSet* ATM_DecompApp::createModelCore2 | ( | ) |
Initialize application.
DecompConstraintSet* ATM_DecompApp::createModelRelax2 | ( | const int | d | ) |
Initialize application.
DecompConstraintSet* ATM_DecompApp::createModelCoreCount | ( | ) |
Initialize application.
DecompConstraintSet* ATM_DecompApp::createModelRelaxCount | ( | ) |
Initialize application.
const int ATM_DecompApp::numCoreCols | ( | ) | const [inline] |
Initialize application.
Definition at line 87 of file ATM_DecompApp.h.
References ATM_Instance::getNAtms(), getNAtmsSteps(), ATM_Instance::getNPairs(), and m_instance.
const int ATM_DecompApp::getNAtmsSteps | ( | ) | const [inline] |
Initialize application.
Definition at line 102 of file ATM_DecompApp.h.
References ATM_Instance::getNAtms(), m_appParam, m_instance, ATM_Param::NumSteps, and ATM_Param::UseTightModel.
Referenced by getColOffset_fp(), getColOffset_z(), and numCoreCols().
void ATM_DecompApp::createModelColumns | ( | DecompConstraintSet * | model, | |
const int | atmIndex = -1 , |
|||
const int | dateIndex = -1 | |||
) |
Initialize application.
const int ATM_DecompApp::getColOffset_x1 | ( | ) | const [inline] |
Initialize application.
Definition at line 123 of file ATM_DecompApp.h.
Referenced by colIndex_x1(), and getColOffset_z().
const int ATM_DecompApp::getColOffset_z | ( | ) | const [inline] |
Initialize application.
Definition at line 126 of file ATM_DecompApp.h.
References getColOffset_x1(), and getNAtmsSteps().
Referenced by colIndex_z(), and getColOffset_fp().
const int ATM_DecompApp::getColOffset_fp | ( | ) | const [inline] |
Initialize application.
Definition at line 129 of file ATM_DecompApp.h.
References getColOffset_z(), and getNAtmsSteps().
Referenced by colIndex_fp(), and getColOffset_fm().
const int ATM_DecompApp::getColOffset_fm | ( | ) | const [inline] |
Initialize application.
Definition at line 132 of file ATM_DecompApp.h.
References getColOffset_fp(), ATM_Instance::getNPairs(), and m_instance.
Referenced by colIndex_fm(), and getColOffset_x2().
const int ATM_DecompApp::getColOffset_x2 | ( | ) | const [inline] |
Initialize application.
Definition at line 135 of file ATM_DecompApp.h.
References getColOffset_fm(), ATM_Instance::getNPairs(), and m_instance.
Referenced by colIndex_x2(), and getColOffset_x3().
const int ATM_DecompApp::getColOffset_x3 | ( | ) | const [inline] |
Initialize application.
Definition at line 138 of file ATM_DecompApp.h.
References getColOffset_x2(), ATM_Instance::getNAtms(), and m_instance.
Referenced by colIndex_x3(), and getColOffset_v().
const int ATM_DecompApp::getColOffset_v | ( | ) | const [inline] |
Initialize application.
Definition at line 141 of file ATM_DecompApp.h.
References getColOffset_x3(), ATM_Instance::getNAtms(), and m_instance.
Referenced by colIndex_v().
const int ATM_DecompApp::colIndex_x1 | ( | const int | a, | |
const int | t | |||
) | const [inline] |
Initialize application.
Definition at line 145 of file ATM_DecompApp.h.
References getColOffset_x1(), m_appParam, ATM_Param::NumSteps, and ATM_Param::UseTightModel.
const int ATM_DecompApp::colIndex_z | ( | const int | a, | |
const int | t | |||
) | const [inline] |
Initialize application.
Definition at line 151 of file ATM_DecompApp.h.
References getColOffset_z(), m_appParam, ATM_Param::NumSteps, and ATM_Param::UseTightModel.
const int ATM_DecompApp::colIndex_fp | ( | const int | pairIndex | ) | const [inline] |
Initialize application.
Definition at line 157 of file ATM_DecompApp.h.
References getColOffset_fp().
const int ATM_DecompApp::colIndex_fm | ( | const int | pairIndex | ) | const [inline] |
Initialize application.
Definition at line 160 of file ATM_DecompApp.h.
References getColOffset_fm().
const int ATM_DecompApp::colIndex_x2 | ( | const int | a | ) | const [inline] |
Initialize application.
Definition at line 163 of file ATM_DecompApp.h.
References getColOffset_x2().
const int ATM_DecompApp::colIndex_x3 | ( | const int | a | ) | const [inline] |
Initialize application.
Definition at line 166 of file ATM_DecompApp.h.
References getColOffset_x3().
const int ATM_DecompApp::colIndex_v | ( | const int | pairIndex | ) | const [inline] |
Initialize application.
Definition at line 169 of file ATM_DecompApp.h.
References getColOffset_v().
void ATM_DecompApp::addColumnNamesA | ( | DecompConstraintSet * | model, | |
const string | prefix, | |||
const int | offset | |||
) |
Initialize application.
void ATM_DecompApp::addColumnNamesAT | ( | DecompConstraintSet * | model, | |
const string | prefix, | |||
const int | offset | |||
) |
Initialize application.
void ATM_DecompApp::addColumnNamesAD | ( | DecompConstraintSet * | model, | |
const string | prefix, | |||
const int | offset | |||
) |
Initialize application.
const string ATM_DecompApp::m_classTag [private] |
Class id tag (for log / debugging).
Reimplemented from DecompApp.
Definition at line 38 of file ATM_DecompApp.h.
ATM_Instance ATM_DecompApp::m_instance [private] |
ATM problem instance data.
Definition at line 41 of file ATM_DecompApp.h.
Referenced by getColOffset_fm(), getColOffset_v(), getColOffset_x2(), getColOffset_x3(), getNAtmsSteps(), and numCoreCols().
ATM_Param ATM_DecompApp::m_appParam [private] |
Application specific parameters.
Definition at line 44 of file ATM_DecompApp.h.
Referenced by colIndex_x1(), colIndex_z(), and getNAtmsSteps().
double* ATM_DecompApp::m_objective [private] |
The model objective coefficients (original space).
Reimplemented from DecompApp.
Definition at line 47 of file ATM_DecompApp.h.
vector<DecompConstraintSet*> ATM_DecompApp::m_models [private] |
The various model constraint systems used for different algos.
Definition at line 50 of file ATM_DecompApp.h.
Referenced by ~ATM_DecompApp().