00001 #ifndef FURNACE_INCLUDED
00002 #define FURNACE_INCLUDED
00003
00004 #include <odem.h>
00005
00006 #include "Bath.h"
00007 #include "HStorage.h"
00008 #include "Observer.h"
00009 #include "Automation.h"
00010 #include "PaletteFrame.h"
00011 #include "CraneRequestq.h"
00012 #include "SetOfRingStack.h"
00013
00014
00015
00016
00017
00018
00019 enum ProcedureClass {A, B, C};
00020
00021 class BathAssistent : public Discrete {
00022 public:
00023 Furnace *myFurnace;
00024 PlaceConfiguration* placeConfiguration;
00025 Place *chillPlace;
00026 CraneRequestq *craneRequestQ;
00027 Waitq *finalOutAirQ;
00028 SetOfRingStack *myPalette;
00029 Treatment* treatment;
00030
00031 BathAssistent (char *n, Furnace * myF, CraneRequestq *cReq, Waitq *foutAq, PlaceConfiguration* pC) :
00032 Discrete(n),
00033 myFurnace(myF),
00034 craneRequestQ(cReq),
00035 finalOutAirQ(foutAq),
00036 myPalette(0),
00037 chillPlace(0),
00038 placeConfiguration(pC)
00039 {};
00040 virtual int main();
00041
00042 };
00043
00044 class Furnace : public Discrete {
00045 public:
00046
00047
00048 int number;
00049 int capacity;
00050 Res *occu;
00051
00052
00053
00054
00055 PlaceConfiguration* placeConfiguration;
00056 Place *chillPlace;
00057 Place *secondChillPlace;
00058 BathAssistent *myAssistent;
00059
00060 CraneRequestq *craneRequestQ;
00061
00062 Waitq *emptyFurnaceQ,
00063 *inAirQ,
00064 *outAirQ,
00065 *inBathQ,
00066 *outBathQ,
00067 *finalOutAirQ,
00068 *nextBathQ,
00069 *readyFurnaceQ,
00070 *dispatcherQ;
00071 Waitq *assistentQ;
00072
00073 SetOfRingStack *myPalette;
00074
00075
00076 Count *inUse;
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 Observer *observe;
00088
00089
00090
00091 Treatment* treatment;
00092 int state;
00093
00094 Automation* automat;
00095
00096
00097
00098 virtual int main();
00099 Furnace(char *n,
00100 int no,
00101 int cap,
00102 CraneRequestq *cReq,
00103 Waitq *eFq,
00104 Waitq *inAq,
00105 Waitq *outAq,
00106 Waitq *inBq,
00107 Waitq *outBq,
00108 Waitq *nextBq,
00109 Waitq *fOutAirQ,
00110 Waitq *rFq,
00111 Waitq *dPq,
00112 Automation* at,
00113 long number,
00114 Observer *ob,
00115
00116
00117 PlaceConfiguration* pC) :
00118
00119 Discrete(n), number(no), capacity(cap),
00120
00121 occu(new Res ("Furnace",cap)),
00122
00123 craneRequestQ(cReq),
00124 emptyFurnaceQ(eFq),
00125 inAirQ(inAq),
00126 outAirQ(outAq),
00127 inBathQ(inBq),
00128 outBathQ(outBq),
00129 nextBathQ(nextBq),
00130 finalOutAirQ(fOutAirQ),
00131 readyFurnaceQ(rFq),
00132 dispatcherQ(dPq),
00133 myPalette(0),
00134 secondChillPlace(0),
00135 placeConfiguration(pC),
00136
00137 assistentQ(new Waitq("assistentQ")),
00138
00139 inUse (new Count("imOfen")),
00140
00141
00142
00143
00144
00145
00146
00147
00148 observe(ob),
00149
00150 automat(at)
00151
00152 {}
00153
00154 double getFreeIn();
00155
00156 private:
00157 void waterOrPolymerChill(BathType type);
00158 void waterAndPolymerChill();
00159 void ventilatorChill();
00160 void finalVentilatorChill();
00161 void airChill();
00162 };
00163
00164 #endif
00165