00001 #ifndef CRANE_INCLUDED
00002 #define CRANE_INCLUDED
00003
00004 #include <odem.h>
00005
00006 #include "CraneRequestq.h"
00007 #include "Bath.h"
00008 #include "Storage.h"
00009 #include "HStorage.h"
00010 #include "Location.h"
00011 #include "Cooling.h"
00012 #include "Observer.h"
00013
00014 class Crane : public Discrete {
00015
00016 double craneTimeTable[14][14];
00017 Waitq *craneWaitQueueInTransmission;
00018
00019 public:
00020 static CraneRequestq* craneRequestQ;
00021
00022 static Waitq* dispatcherQ;
00023 static Waitq* emptyFurnaceQ;
00024 static Waitq* inBathQ;
00025 static Waitq* inAirQ;
00026 static Waitq* outBathQ;
00027 static Waitq* nextBathQ;
00028 static Waitq* outAirQ;
00029 static Waitq* finalOutAirQ;
00030 static Waitq* readyFurnaceQ;
00031
00032 Storage *transfer;
00033 PlaceConfiguration *placeConfiguration;
00034 Place *parkingPlace,
00035 *bathPlace;
00036 Observer *observer;
00037
00038 Res *occu;
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 Location *loc;
00049
00050 void moveTo(PositionType pt, int no);
00051 void newPos(PositionType pt, int no, Direction d);
00052
00053 virtual int main();
00054
00055 Crane ( char *n,
00056
00057 Storage *st, PlaceConfiguration *pC,
00058 Res *occ,
00059
00060 Location* lo, Observer *ob, Waitq *craneWaitQueueInTransmission_);
00061
00062 static bool PALETTEorFILLEDorEMPTYorHOTorCOOLorNEXTBATHorREADY();
00063 static bool PALETTEorFILLEDorHOTorCOOLorNEXTBATHorREADY();
00064 static bool EMPTYorHOTorCOOLorNEXTBATHorREADY();
00065 static bool HOTorCOOLorNEXTBATHorREADY();
00066 };
00067
00068 #endif
00069