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 enum { OFF=0, 00022 ON=1, 00023 } state; 00024 double cycle_time; 00025 private: 00026 double runtime; 00027 double last_runtime; 00028 double state_time; 00029 double prev_demand; 00030 TIMESTAMP cycle_start, cycle_on, cycle_off; 00031 public: 00032 static CLASS *oclass, *pclass; 00033 static microwave *defaults; 00034 00035 microwave(MODULE *module); 00036 ~microwave(); 00037 int create(); 00038 void init_noshape(); 00039 int init(OBJECT *parent); 00040 int isa(char *classname); 00041 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1); 00042 double update_state(double dt=0.0); 00043 TIMESTAMP update_state_cycle(TIMESTAMP t0, TIMESTAMP t1); 00044 }; 00045 00046 #endif // _MICROWAVE_H 00047