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