00001 
00010 #ifndef _DRYER_H
00011 #define _DRYER_H
00012 
00013 #include "residential.h"
00014 #include "residential_enduse.h"
00015 
00016 class dryer : public residential_enduse
00017 {
00018 public:
00019     typedef enum {  DRYER_STOPPED=0,        
00020             DRYER_STALLED=1,                        
00021             DRYER_TRIPPED=2,                        
00022             DRYER_MOTOR_COIL_ONLY=3,                
00023             DRYER_MOTOR_ONLY=4,                     
00024             DRYER_CONTROL_ONLY=5                    
00025     };                                      
00026 
00027 
00028 
00029     double circuit_split;               
00030     bool is_240;                        
00031     
00032     bool control_check;                 
00033 
00034     bool new_running_state;
00035     bool motor_only_check1;
00036     bool motor_only_check2;
00037     bool motor_only_check3;
00038     bool motor_only_check4;
00039     bool motor_only_check5;
00040     bool motor_only_check6;
00041 
00042     bool motor_coil_only_check1;
00043     bool motor_coil_only_check2;
00044     bool motor_coil_only_check3;
00045     bool motor_coil_only_check4;
00046     bool motor_coil_only_check5;
00047     bool motor_coil_only_check6;
00048 
00049     bool dryer_on;
00050     bool dryer_check;
00051     bool dryer_ready;
00052 
00053 
00054 
00055     double motor_power;                 
00056     double coil_power[1];               
00057     double controls_power;
00058     double daily_dryer_demand;          
00059     double enduse_queue;                
00060     double cycle_duration;              
00061     double cycle_time;                  
00062     double state_time;                  
00063     
00064     double dryer_run_prob;
00065     double next_t;
00066     double dryer_turn_on;
00067     double queue_min;
00068     double queue_max;
00069 
00070     
00071     TIMESTAMP next_change_time;         
00072     
00073 
00074     double stall_voltage;               
00075     double start_voltage;               
00076     complex stall_impedance;            
00077     double trip_delay;                  
00078     double reset_delay;                 
00079     double heat_fraction;               
00080     
00081     TIMESTAMP start_time;
00082     
00083     double energy_baseline;             
00084     double energy_used;                 
00085     double actual_dryer_demand;
00086     double pulse_interval[10];          
00087     
00088     double energy_needed;               
00089     double total_power;                 
00090     double motor_on_off;                
00091     double motor_coil_on_off;
00092 
00093 
00094     TIMESTAMP time_state;               
00095 
00096     TIMESTAMP return_time;
00097 
00098     enumeration state;
00099 
00100 public:
00101     static CLASS *oclass, *pclass;
00102     static dryer *defaults;
00103 
00104     dryer(MODULE *module);
00105     ~dryer();
00106     int create();
00107     int init(OBJECT *parent);
00108     int isa(char *classname);
00109     TIMESTAMP last_t;
00110     TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00111     TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00112     double update_state(double dt);     
00113 
00114 };
00115 
00116 #endif // _DRYER_H
00117