MMKP_Instance Class Reference

#include <MMKP_Instance.h>

List of all members.

Public Member Functions

Access methods.



const int getNKnapRows () const
const int getNGroupRows () const
const int getNGroupCols () const
const double * getCapacity () const
const double * getValue () const
const double *const * getWeight () const
Helper Methods.



void readInstance (string &fileName, string &dataFormat)
void readInstanceSimon (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



 MMKP_Instance ()
 Default constructor.
 MMKP_Instance (string &fileName)
 Default constructor.
 ~MMKP_Instance ()
 Default destructor.

Private Attributes

int m_nKnapRows
 MMKP_Instance problem instance data.
int m_nGroupRows
int m_nGroupCols
double * m_capacity
double * m_value
double ** m_weight
bool m_isProvenOptimal
 MMKP_Instance best known LB/UB.
double m_bestKnownLB
double m_bestKnownUB

Detailed Description

A class to store an instance of the Multi-Dimensional Mulit-Choice Knapsack Problem (MMKP).

max sum{i in 1..n, j in 1..l[i]} v[i,j] x[i,j] s.t. sum{i in 1..n, j in 1..l[i]} r[k,i,j] x[i,j] <= b[k], k in 1..m sum{j in 1..l[i]} x[i,j] = 1 , i in 1..n x[i,j] in {0,1}, i in 1..n, j in 1..l[i]

Definition at line 37 of file MMKP_Instance.h.


Constructor & Destructor Documentation

MMKP_Instance::MMKP_Instance (  )  [inline]

Default constructor.

Definition at line 98 of file MMKP_Instance.h.

References initMembers().

MMKP_Instance::MMKP_Instance ( string &  fileName  )  [inline]

Default constructor.

Takes an instance of UtilParameters

Definition at line 103 of file MMKP_Instance.h.

References initMembers(), and readInstance().

MMKP_Instance::~MMKP_Instance (  )  [inline]

Default destructor.

Definition at line 110 of file MMKP_Instance.h.

References m_capacity, m_nKnapRows, m_value, m_weight, and UTIL_DELARR.


Member Function Documentation

const int MMKP_Instance::getNKnapRows (  )  const [inline]

Definition at line 55 of file MMKP_Instance.h.

References m_nKnapRows.

const int MMKP_Instance::getNGroupRows (  )  const [inline]

Definition at line 56 of file MMKP_Instance.h.

References m_nGroupRows.

const int MMKP_Instance::getNGroupCols (  )  const [inline]

Definition at line 57 of file MMKP_Instance.h.

References m_nGroupCols.

const double* MMKP_Instance::getCapacity (  )  const [inline]

Definition at line 58 of file MMKP_Instance.h.

References m_capacity.

const double* MMKP_Instance::getValue (  )  const [inline]

Definition at line 59 of file MMKP_Instance.h.

References m_value.

const double* const* MMKP_Instance::getWeight (  )  const [inline]

Definition at line 60 of file MMKP_Instance.h.

References m_weight.

void MMKP_Instance::readInstance ( string &  fileName,
string &  dataFormat 
)

Referenced by MMKP_Instance().

void MMKP_Instance::readInstanceSimon ( string &  fileName  ) 
void MMKP_Instance::readBestKnown ( string &  fileName,
string &  instanceName 
)
void MMKP_Instance::initMembers (  )  [inline]
const int MMKP_Instance::getIndexIJ ( const int  i,
const int  j 
) const [inline]

Definition at line 82 of file MMKP_Instance.h.

References m_nGroupCols.

pair<int,int> MMKP_Instance::getIndexInv ( const int  index  )  const [inline]

Definition at line 87 of file MMKP_Instance.h.

References m_nGroupCols.

const double MMKP_Instance::getBestKnownLB (  )  const [inline]

Definition at line 91 of file MMKP_Instance.h.

References m_bestKnownLB.

const double MMKP_Instance::getBestKnownUB (  )  const [inline]

Definition at line 92 of file MMKP_Instance.h.

References m_bestKnownUB.


Member Data Documentation

MMKP_Instance problem instance data.

Definition at line 40 of file MMKP_Instance.h.

Referenced by getNKnapRows(), initMembers(), and ~MMKP_Instance().

Definition at line 41 of file MMKP_Instance.h.

Referenced by getNGroupRows(), and initMembers().

Definition at line 42 of file MMKP_Instance.h.

Referenced by getIndexIJ(), getIndexInv(), getNGroupCols(), and initMembers().

double* MMKP_Instance::m_capacity [private]

Definition at line 43 of file MMKP_Instance.h.

Referenced by getCapacity(), initMembers(), and ~MMKP_Instance().

double* MMKP_Instance::m_value [private]

Definition at line 44 of file MMKP_Instance.h.

Referenced by getValue(), initMembers(), and ~MMKP_Instance().

double** MMKP_Instance::m_weight [private]

Definition at line 45 of file MMKP_Instance.h.

Referenced by getWeight(), initMembers(), and ~MMKP_Instance().

MMKP_Instance best known LB/UB.

Definition at line 48 of file MMKP_Instance.h.

Referenced by initMembers().

double MMKP_Instance::m_bestKnownLB [private]

Definition at line 49 of file MMKP_Instance.h.

Referenced by getBestKnownLB(), and initMembers().

double MMKP_Instance::m_bestKnownUB [private]

Definition at line 50 of file MMKP_Instance.h.

Referenced by getBestKnownUB(), and initMembers().


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

Generated on 3 Jun 2015 for Dip-All by  doxygen 1.6.1