Dip  0.92.4
Private Attributes | List of all members
GAP_Instance Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

GAP_Instance::GAP_Instance ( )
inline

Default constructor.

Definition at line 116 of file GAP_Instance.h.

GAP_Instance::GAP_Instance ( string &  fileName)
inline

Default constructor.

Takes an instance of UtilParameters

Definition at line 121 of file GAP_Instance.h.

GAP_Instance::~GAP_Instance ( )
inline

Default constructor.

Definition at line 126 of file GAP_Instance.h.

References UTIL_DELARR.

Member Function Documentation

const int GAP_Instance::getNTasks ( ) const
inline
const int GAP_Instance::getNMachines ( ) const
inline

Definition at line 66 of file GAP_Instance.h.

const int* GAP_Instance::getCapacity ( ) const
inline

Definition at line 69 of file GAP_Instance.h.

const int* GAP_Instance::getProfit ( ) const
inline

Definition at line 72 of file GAP_Instance.h.

const int* GAP_Instance::getWeight ( ) const
inline

Definition at line 75 of file GAP_Instance.h.

void GAP_Instance::readInstance ( string &  filename)
void GAP_Instance::readBestKnown ( string &  fileName,
string &  instanceName 
)
void GAP_Instance::initMembers ( )
inline

Definition at line 85 of file GAP_Instance.h.

const int GAP_Instance::getIndexIJ ( const int  i,
const int  j 
) const
inline

Definition at line 96 of file GAP_Instance.h.

pair<int, int> GAP_Instance::getIndexInv ( const int  index) const
inline

Definition at line 101 of file GAP_Instance.h.

const double GAP_Instance::getBestKnownLB ( ) const
inline

Definition at line 105 of file GAP_Instance.h.

const double GAP_Instance::getBestKnownUB ( ) const
inline

Definition at line 108 of file GAP_Instance.h.

Member Data Documentation

int GAP_Instance::m_nTasks
private

GAP_Instance problem instance data.

Definition at line 49 of file GAP_Instance.h.

int GAP_Instance::m_nMachines
private

Definition at line 50 of file GAP_Instance.h.

int* GAP_Instance::m_capacity
private

Definition at line 51 of file GAP_Instance.h.

int* GAP_Instance::m_profit
private

Definition at line 52 of file GAP_Instance.h.

int* GAP_Instance::m_weight
private

Definition at line 53 of file GAP_Instance.h.

bool GAP_Instance::m_isProvenOptimal
private

GAP_Instance best known LB/UB.

Definition at line 56 of file GAP_Instance.h.

double GAP_Instance::m_bestKnownLB
private

Definition at line 57 of file GAP_Instance.h.

double GAP_Instance::m_bestKnownUB
private

Definition at line 58 of file GAP_Instance.h.


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