00001
00010 #ifndef _FREEZER_H
00011 #define _FREEZER_H
00012
00013 #include "residential.h"
00014 #include "residential_enduse.h"
00015 #include "house_e.h"
00016
00017 class freezer : public residential_enduse
00018 {
00019 public:
00020 typedef enum {
00021 S_OFF=0,
00022 S_ON=1
00023 } MOTORSTATE;
00024
00025 private:
00026 house_e *pHouse;
00027 PROPERTY *pTempProp;
00028
00029 public:
00030 double size;
00031 double rated_capacity;
00032 double thermostat_deadband;
00033 double UA;
00034 double UAr;
00035 double UAf;
00036 double Tair;
00037 double Tout;
00038 double Tset;
00039 double Cf;
00040 double Qr;
00041 double COPcoef;
00042
00043 double Tevent;
00044
00045 double power_factor;
00046
00047 enumeration motor_state;
00048 TIMESTAMP last_time, next_time;
00049
00050 public:
00051
00052 static CLASS *oclass, *pclass;
00053 static freezer *defaults;
00054 freezer(MODULE *module);
00055 ~freezer();
00056
00057 int create();
00058 int init(OBJECT *parent);
00059 int isa(char *classname);
00060 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00061 void thermostat(TIMESTAMP t0, TIMESTAMP t1);
00062 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00063 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00064 };
00065
00066 #endif // _FREEZER_H
00067