00001 00010 #ifndef _MICROWAVE_H 00011 #define _MICROWAVE_H 00012 #include "residential.h" 00013 #include "residential_enduse.h" 00014 00015 class microwave : public residential_enduse 00016 { 00017 public: 00018 double circuit_split; 00019 double installed_power; 00020 double standby_power; 00021 double demand; 00022 double power_factor; 00023 double heat_fraction; 00024 enum { OFF=0, 00025 ON=1, 00026 } state; 00027 double cycle_time; 00028 private: 00029 double runtime; 00030 double last_runtime; 00031 double state_time; 00032 double prev_demand; 00033 TIMESTAMP cycle_start, cycle_on, cycle_off; 00034 public: 00035 static CLASS *oclass, *pclass; 00036 static microwave *defaults; 00037 00038 microwave(MODULE *module); 00039 ~microwave(); 00040 int create(); 00041 void init_noshape(); 00042 int init(OBJECT *parent); 00043 int isa(char *classname); 00044 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1); 00045 double update_state(double dt=0.0); 00046 TIMESTAMP update_state_cycle(TIMESTAMP t0, TIMESTAMP t1); 00047 }; 00048 00049 #endif // _MICROWAVE_H 00050