Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Furnace.h

Go to the documentation of this file.
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 //Furnace Types
00015 //const int SINGLE                              =  1;
00016 //const int DOUBLE                              =  2;
00017 //enum States {empty, singleState, half, doubleMix, doublePure};
00018 
00019 enum ProcedureClass {A, B, C};
00020 
00021 class BathAssistent : public Discrete {
00022 public:
00023         Furnace *myFurnace;
00024         PlaceConfiguration*     placeConfiguration;
00025         Place                   *chillPlace;    // kann Stellplatz, Polymer- oder Wasserbad sein
00026         CraneRequestq   *craneRequestQ; // Registrierung von Krananforderungen
00027         Waitq                   *finalOutAirQ;  // Synchronisation mit Kran zur Abholung der Palette
00028         SetOfRingStack  *myPalette;     // Palettenzuordnung
00029         Treatment*              treatment;              // Aktuelle Wärmebehandlung
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 //      static  double  lastStart;              // Der Wert [time() - lastStart] muß größer
00047                                         // gleich SHIFT sein
00048         int                             number;                 // Ofennummer   
00049         int                             capacity;               // Ofenkapazität
00050         Res                             *occu;                  // Ofenauslastungsbeobachtung
00051 
00052 //      States                  occupied;
00053 //      bool                    firstTime;
00054 
00055         PlaceConfiguration*     placeConfiguration;
00056         Place                   *chillPlace;            // kann Stellplatz, Polymer- oder Wasserbad sein
00057         Place                   *secondChillPlace;      // z.B. Wasser -> Polymer
00058         BathAssistent   *myAssistent;
00059 
00060         CraneRequestq   *craneRequestQ; // Registrierung von Krananforderungen
00061 
00062         Waitq                   *emptyFurnaceQ, // Synchronisation mit Kran als freier Single-Ofen (1 Palette)                          
00063                                         *inAirQ,                // Synchronisation mit Kran als heisser Ofen (Abschreckung)                             
00064                                         *outAirQ,               // Synchronisation mit Kran als heisser Ofen (Abschreckung)
00065                                         *inBathQ,               // Synchronisation mit Kran als heisser Ofen (Abschreckung)                             
00066                                         *outBathQ,              // Synchronisation mit Kran als heisser Ofen (Abschreckung)     
00067                                         *finalOutAirQ,
00068                                         *nextBathQ,             // Synchronisation mit Kran als heisser Ofen (2.Abschreckung)   
00069                                         *readyFurnaceQ, // Synchronisation mit Kran als fertiger Ofen 
00070                                         *dispatcherQ;   // zum Test einer Folgepalette
00071         Waitq                   *assistentQ;
00072 
00073         SetOfRingStack  *myPalette;     // erste Palettenbelegung (0, falls leer)
00074                                 
00075 
00076         Count                   *inUse;                 // Zähler augenblicklicher Paletten im Ofen
00077 
00078         //Histo                 *profileLoading;// Zeitprofil der Wartezeiten
00079         //Histo                 *waitSumA;              // Wartezeit eines Ofens (auf Kran oder freies Bad nach Start)
00080 //      Histo                   *waitSumB;              // Wartezeit eines Ofens (auf Kran oder freies Bad nach Start)
00081 
00082 //      Histo                   *cycleTimeSum;  // Laufzeit eines Ofens
00083 //      Count                   *cycleNumber;   // Anzahl von Ofenzyklen
00084         //Histo                 *realShift;             //
00085 
00086         //void                  coolingIn(int type); // 0->Water, 1->Polymer, 2->Water/Polymer
00087         Observer                *observe;
00088 
00089 //      long                    vpos; // Position im Animator
00090 
00091         Treatment*              treatment; // Aktuelle Wärmebehandlung
00092         int                             state; // Abarbeitungszustand in der aktuellen Wärmebehandlung
00093 
00094         Automation*             automat;                        // Zeiger auf Pufferstrecke für Aktivierung
00095 
00096 //      Histo*  blockedWater;                   // Registratur der Wartezeiten auf Abschreckung
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, /*Histo *hL,*/
00113                         long number, /*Histo *rS,*/
00114                         Observer *ob, 
00115 //                      long vp,
00116 //                      Histo *blW,
00117                         PlaceConfiguration* pC) : 
00118 
00119                         Discrete(n), number(no), capacity(cap), 
00120                                 //firstTime(true),                              
00121                                 occu(new Res ("Furnace",cap)), 
00122                                 //occupied(empty), 
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 //                              singleUse       (new Count("FurnUsed")),
00141 
00142                                 /*profileLoading(hL),*/
00143 //                              cycleTimeSum(new Histo("FurnCycleTime",21,23,5)),
00144 //                              waitSumA        (new Histo("waitSumA",0,50,10)),
00145 //                              waitSumB        (new Histo("waitSumB",0,50,10)),
00146 //                              cycleNumber     (new Count("cycleNumber")),
00147                                 /*realShift(rS),*/
00148                                 observe(ob),
00149 //                              vpos(vp),
00150                                 automat(at)
00151                                 //blockedWater(blW)
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 

Generated on Tue Apr 26 14:42:42 2005 for rollingmill by doxygen 1.3.6