Dip
0.92.4
|
#include <GAP_Instance.h>
Public Member Functions | |
Access methods. | |
const int | getNTasks () const |
const int | getNMachines () const |
const int * | getCapacity () const |
const int * | getProfit () const |
const int * | getWeight () const |
Helper Methods. | |
void | readInstance (string &filename) |
void | readBestKnown (string &fileName, string &instanceName) |
void | initMembers () |
const int | getIndexIJ (const int i, const int j) const |
pair< int, int > | getIndexInv (const int index) const |
const double | getBestKnownLB () const |
const double | getBestKnownUB () const |
Constructor and Destructor | |
GAP_Instance () | |
Default constructor. More... | |
GAP_Instance (string &fileName) | |
Default constructor. More... | |
~GAP_Instance () | |
Default constructor. More... | |
Private Attributes | |
int | m_nTasks |
GAP_Instance problem instance data. More... | |
int | m_nMachines |
int * | m_capacity |
int * | m_profit |
int * | m_weight |
bool | m_isProvenOptimal |
GAP_Instance best known LB/UB. More... | |
double | m_bestKnownLB |
double | m_bestKnownUB |
A class to store an instance of the Generalized Assignment Problem (GAP).
Find the maximum profit assignment of n tasks to m machines such that each task is assinged to precisely one machine subject to capacity restrictions of the machine.
max sum{i in 1..m, j in 1..n} p[i,j] x[i,j] s.t. sum{ j in 1..n} w[i,j] x[i,j] <= b[i], i in 1..m sum{i in 1..m } x[i,j] = 1 , j in 1..n x[i,j] in {0,1}, i in 1..m, j in 1..n
x[i,j]=1 means assign task j to agent i
Note: DIP does min, so, we solve for min sum{ij} -p[i,j] x[i,j].
Definition at line 45 of file GAP_Instance.h.
|
inline |
Default constructor.
Definition at line 116 of file GAP_Instance.h.
|
inline |
Default constructor.
Takes an instance of UtilParameters
Definition at line 121 of file GAP_Instance.h.
|
inline |
|
inline |
Definition at line 63 of file GAP_Instance.h.
Referenced by GAP_DecompApp::getIndexIJ(), GAP_DecompApp::getIndexInv(), and GAP_DecompApp::getOffsetI().
|
inline |
Definition at line 66 of file GAP_Instance.h.
|
inline |
Definition at line 69 of file GAP_Instance.h.
|
inline |
Definition at line 72 of file GAP_Instance.h.
|
inline |
Definition at line 75 of file GAP_Instance.h.
void GAP_Instance::readInstance | ( | string & | filename | ) |
void GAP_Instance::readBestKnown | ( | string & | fileName, |
string & | instanceName | ||
) |
|
inline |
Definition at line 85 of file GAP_Instance.h.
|
inline |
Definition at line 96 of file GAP_Instance.h.
|
inline |
Definition at line 101 of file GAP_Instance.h.
|
inline |
Definition at line 105 of file GAP_Instance.h.
|
inline |
Definition at line 108 of file GAP_Instance.h.
|
private |
GAP_Instance problem instance data.
Definition at line 49 of file GAP_Instance.h.
|
private |
Definition at line 50 of file GAP_Instance.h.
|
private |
Definition at line 51 of file GAP_Instance.h.
|
private |
Definition at line 52 of file GAP_Instance.h.
|
private |
Definition at line 53 of file GAP_Instance.h.
|
private |
GAP_Instance best known LB/UB.
Definition at line 56 of file GAP_Instance.h.
|
private |
Definition at line 57 of file GAP_Instance.h.
|
private |
Definition at line 58 of file GAP_Instance.h.