#include <ATM_Instance.h>
Public Member Functions | |
Access methods. | |
const int | getNAtms () const |
const int | getNDates () const |
const int | getNPairs () const |
const vector< int > & | getPairsAD () const |
const int | getIndexAD (int a, int d) const |
const pair< int, int > | getIndexADInv (int ad) const |
const double * | get_a_ad () const |
const double * | get_b_ad () const |
const double * | get_c_ad () const |
const double * | get_d_ad () const |
const double * | get_e_ad () const |
const double * | get_w_ad () const |
const double * | get_B_d () const |
const double * | get_K_a () const |
const string & | getAtmName (const int a) const |
const string & | getDateName (const int d) const |
Helper Methods. | |
void | readInstance (string &fileNameA, string &fileNameD, string &fileNameAD) |
void | generateRandom (const int nAtms, const int nDates, const int seed) |
void | initMembers () |
Constructor and Destructor | |
ATM_Instance () | |
Default constructor. | |
ATM_Instance (string &fileNameA, string &fileNameD, string &fileNameAD) | |
Default constructor. | |
~ATM_Instance () | |
Default constructor. | |
Private Attributes | |
int | m_nAtms |
ATM_Instance problem instance data. | |
int | m_nDates |
map< string, int > | m_strToIntAtms |
map< string, int > | m_strToIntDates |
vector< string > | m_intToStrAtms |
vector< string > | m_intToStrDates |
vector< int > | m_pairsAD |
double * | m_a_ad |
double * | m_b_ad |
double * | m_c_ad |
double * | m_d_ad |
double * | m_e_ad |
double * | m_w_ad |
double * | m_B_d |
double * | m_K_a |
A class to store an instance of the ATM Cash Management Problem (ATM).
The original problem is in the form of a MINLP: min sum{a in A, d in D} | f[a,d] | s.t. for a in A, d in D: f[a,d] = a[a,d] x1[a] + b[a,d] x2[a] + c[a,d] x1[a] x2[a] + d[a,d] x3[a] + e[a,d] for d in D: sum{a in A} f[a,d] <= B[d] for a in A: |{d in D : f[a,d] <= 0} <= K[a] for a in A, d in D: f[a,d] free for a in A: x1[a], x2[a] in [0,1] x3[a] >= 0
Definition at line 50 of file ATM_Instance.h.
ATM_Instance::ATM_Instance | ( | ) | [inline] |
Default constructor.
Takes an instance of UtilParameters
Definition at line 128 of file ATM_Instance.h.
References initMembers().
ATM_Instance::ATM_Instance | ( | string & | fileNameA, | |
string & | fileNameD, | |||
string & | fileNameAD | |||
) | [inline] |
Default constructor.
Takes an instance of UtilParameters
Definition at line 130 of file ATM_Instance.h.
References initMembers(), and readInstance().
ATM_Instance::~ATM_Instance | ( | ) | [inline] |
Default constructor.
Takes an instance of UtilParameters
Definition at line 140 of file ATM_Instance.h.
References m_a_ad, m_b_ad, m_B_d, m_c_ad, m_d_ad, m_e_ad, m_K_a, m_w_ad, and UTIL_DELARR.
const int ATM_Instance::getNAtms | ( | ) | const [inline] |
Definition at line 73 of file ATM_Instance.h.
References m_nAtms.
Referenced by ATM_DecompApp::getColOffset_v(), ATM_DecompApp::getColOffset_x3(), ATM_DecompApp::getNAtmsSteps(), and ATM_DecompApp::numCoreCols().
const int ATM_Instance::getNDates | ( | ) | const [inline] |
Definition at line 74 of file ATM_Instance.h.
References m_nDates.
const int ATM_Instance::getNPairs | ( | ) | const [inline] |
Definition at line 75 of file ATM_Instance.h.
References m_pairsAD.
Referenced by ATM_DecompApp::getColOffset_fm(), ATM_DecompApp::getColOffset_x2(), and ATM_DecompApp::numCoreCols().
const vector<int>& ATM_Instance::getPairsAD | ( | ) | const [inline] |
Definition at line 78 of file ATM_Instance.h.
References m_pairsAD.
const int ATM_Instance::getIndexAD | ( | int | a, | |
int | d | |||
) | const [inline] |
Definition at line 81 of file ATM_Instance.h.
References m_nDates.
const pair<int,int> ATM_Instance::getIndexADInv | ( | int | ad | ) | const [inline] |
Definition at line 84 of file ATM_Instance.h.
References m_nDates.
const double* ATM_Instance::get_a_ad | ( | ) | const [inline] |
Definition at line 87 of file ATM_Instance.h.
References m_a_ad.
const double* ATM_Instance::get_b_ad | ( | ) | const [inline] |
Definition at line 88 of file ATM_Instance.h.
References m_b_ad.
const double* ATM_Instance::get_c_ad | ( | ) | const [inline] |
Definition at line 89 of file ATM_Instance.h.
References m_c_ad.
const double* ATM_Instance::get_d_ad | ( | ) | const [inline] |
Definition at line 90 of file ATM_Instance.h.
References m_d_ad.
const double* ATM_Instance::get_e_ad | ( | ) | const [inline] |
Definition at line 91 of file ATM_Instance.h.
References m_e_ad.
const double* ATM_Instance::get_w_ad | ( | ) | const [inline] |
Definition at line 92 of file ATM_Instance.h.
References m_w_ad.
const double* ATM_Instance::get_B_d | ( | ) | const [inline] |
Definition at line 93 of file ATM_Instance.h.
References m_B_d.
const double* ATM_Instance::get_K_a | ( | ) | const [inline] |
Definition at line 94 of file ATM_Instance.h.
References m_K_a.
const string& ATM_Instance::getAtmName | ( | const int | a | ) | const [inline] |
Definition at line 95 of file ATM_Instance.h.
References m_intToStrAtms.
const string& ATM_Instance::getDateName | ( | const int | d | ) | const [inline] |
Definition at line 98 of file ATM_Instance.h.
References m_intToStrDates.
void ATM_Instance::readInstance | ( | string & | fileNameA, | |
string & | fileNameD, | |||
string & | fileNameAD | |||
) |
Referenced by ATM_Instance().
void ATM_Instance::generateRandom | ( | const int | nAtms, | |
const int | nDates, | |||
const int | seed | |||
) |
void ATM_Instance::initMembers | ( | ) | [inline] |
int ATM_Instance::m_nAtms [private] |
ATM_Instance problem instance data.
Definition at line 54 of file ATM_Instance.h.
Referenced by getNAtms(), and initMembers().
int ATM_Instance::m_nDates [private] |
Definition at line 55 of file ATM_Instance.h.
Referenced by getIndexAD(), getIndexADInv(), getNDates(), and initMembers().
map<string, int> ATM_Instance::m_strToIntAtms [private] |
Definition at line 56 of file ATM_Instance.h.
map<string, int> ATM_Instance::m_strToIntDates [private] |
Definition at line 57 of file ATM_Instance.h.
vector<string> ATM_Instance::m_intToStrAtms [private] |
Definition at line 58 of file ATM_Instance.h.
Referenced by getAtmName().
vector<string> ATM_Instance::m_intToStrDates [private] |
Definition at line 59 of file ATM_Instance.h.
Referenced by getDateName().
vector<int> ATM_Instance::m_pairsAD [private] |
Definition at line 60 of file ATM_Instance.h.
Referenced by getNPairs(), and getPairsAD().
double* ATM_Instance::m_a_ad [private] |
Definition at line 62 of file ATM_Instance.h.
Referenced by get_a_ad(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_b_ad [private] |
Definition at line 63 of file ATM_Instance.h.
Referenced by get_b_ad(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_c_ad [private] |
Definition at line 64 of file ATM_Instance.h.
Referenced by get_c_ad(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_d_ad [private] |
Definition at line 65 of file ATM_Instance.h.
Referenced by get_d_ad(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_e_ad [private] |
Definition at line 66 of file ATM_Instance.h.
Referenced by get_e_ad(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_w_ad [private] |
Definition at line 67 of file ATM_Instance.h.
Referenced by get_w_ad(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_B_d [private] |
Definition at line 68 of file ATM_Instance.h.
Referenced by get_B_d(), initMembers(), and ~ATM_Instance().
double* ATM_Instance::m_K_a [private] |
Definition at line 69 of file ATM_Instance.h.
Referenced by get_K_a(), initMembers(), and ~ATM_Instance().