BAPS/partitioning/TV/BAPTVVessel.h

00001 /******************************************************************
00002  *
00003  * Filename    : BAPTVVessel.h
00004  * Author      : David Ong Tat-Wee
00005  *
00006  * Version     : 1.01b
00007  * Date        : 10 Jun 98
00008  *
00009  * Description : Implements the TVVessel class (?)
00010  *
00011  * Reference   : nil
00012  *
00013  * Notes       : 
00014  *
00015  * Changes     : nil
00016  *
00017  * Copyright   : Copyright (c) 1998
00018  *               All rights reserved by
00019  *               Resource Allocation and Scheduling Group
00020  *               Department of Information Systems and Computer Science
00021  *               National University of Singapore
00022  *
00023  ******************************************************************/
00024 
00025 #ifndef __BAP_TV_VESSEL__
00026 #define __BAP_TV_VESSEL__
00027 
00028 
00029 #include "def.h"
00030 
00031 using std::istream;
00032 using std::ostream;
00033 using leda::set;
00034 
00035 class TVVessel
00036 {
00037 public:
00038    TVVessel();
00039    TVVessel(int anID, int aLength);
00040    TVVessel(const TVVessel& aVessel);
00041    ~TVVessel();
00042    TVVessel& operator=(const TVVessel& aVessel);
00043    void Print(const int& aWidth = 1, const int& aDetail = 0) const;
00044 
00045    friend   istream& operator>>(istream& anIS, TVVessel& aVessel);
00046    friend   ostream& operator<<(ostream& anOS, const TVVessel& aVessel);
00047    friend   int compare(const TVVessel& aV1, const TVVessel& aV2);
00048 
00049    int      ID() const;
00050    int      Length() const;
00051    int      Containers() const;
00052    int      Import() const;
00053    int      Export() const;
00054    int      Transhipment() const;
00055    int      StartTimeZone() const;
00056    int      EndTimeZone() const;
00057    int      Arrival() const;
00058    int      Departure() const;
00059    int      Section() const;
00060    const set<int>& Neighbours() const;
00061    const set<int>& Destinations() const;
00062 
00063    int      Import(int aNumContainers);
00064    int      Export(int aNumContainers);
00065    int      StartTimeZone(int aTimeZone);
00066    int      EndTimeZone(int aTimeZone);
00067    int      Arrival(int aTime);
00068    int      Departure(int aTime);
00069    int      Section(int aSection);
00070    void     AddNeighbour(int aVessel);
00071    void     AddTranshipment(int aValue);
00072    void     AddDestination(int aSection);
00073    void     RemoveDestination(int aSection);
00074 
00075 private:
00076    int      mID;
00077    int      mLength;
00078    int      mContainers;
00079    int      mImport, mExport, mTranshipment;
00080    int      mStartTimeZone, mEndTimeZone;
00081    int      mArrival, mDeparture;
00082    int      mSection;
00083    set<int> mNeighbours;
00084    set<int> mPotentialDestinations;
00085 };
00086 
00087 
00088 #endif

Generated on Tue Sep 9 15:40:10 2008 for BAP by  doxygen 1.5.3