00001
00010 #ifndef _dishwasher_H
00011 #define _dishwasher_H
00012
00013 #include "residential.h"
00014 #include "residential_enduse.h"
00015
00016 class dishwasher : public residential_enduse
00017 {
00018 public:
00019 typedef enum { dishwasher_STOPPED=0,
00020 dishwasher_STALLED=1,
00021 dishwasher_TRIPPED=2,
00022 dishwasher_COIL_ONLY=3,
00023 dishwasher_MOTOR_COIL_ONLY=4,
00024 dishwasher_MOTOR_ONLY=5,
00025 dishwasher_CONTROL_ONLY=6,
00026 dishwasher_HEATEDDRY_ONLY=7
00027 };
00028 enumeration state;
00029
00030
00031
00032 double circuit_split;
00033 bool is_240;
00034
00035 bool control_check1;
00036 bool control_check2;
00037 bool control_check3;
00038 bool control_check4;
00039 bool control_check5;
00040 bool control_check6;
00041 bool control_check7;
00042 bool control_check8;
00043 bool control_check9;
00044 bool control_check10;
00045 bool control_check11;
00046 bool control_check12;
00047 bool control_check_temp;
00048
00049 bool new_running_state;
00050
00051 bool motor_only_check1;
00052 bool motor_only_check2;
00053 bool motor_only_check3;
00054 bool motor_only_check4;
00055 bool motor_only_check5;
00056 bool motor_only_check6;
00057 bool motor_only_check7;
00058 bool motor_only_check8;
00059 bool motor_only_check9;
00060
00061
00062 bool motor_only_temp1;
00063 bool motor_only_temp2;
00064 bool motor_only_25_repeat_one;
00065
00066 bool motor_coil_only_check1;
00067 bool motor_coil_only_check2;
00068
00069
00070 bool heateddry_check1;
00071 bool heateddry_check2;
00072
00073 bool coil_only_check1;
00074 bool coil_only_check2;
00075 bool coil_only_check3;
00076 bool Heateddry_option_check;
00077
00078
00079 double zero_power;
00080 double motor_power;
00081 double coil_power[4];
00082 double controls_power;
00083 double dishwasher_demand;
00084 double enduse_queue;
00085 double cycle_duration;
00086 double cycle_time;
00087 double state_time;
00088 double count_motor_only;
00089 double count_motor_only1;
00090 double count_motor_only_25;
00091 double count_coil_only;
00092 double count_motor_only_68;
00093 double daily_dishwasher_demand;
00094 double dishwasher_run_prob;
00095 double queue_min;
00096 double queue_max;
00097
00098 double count_control_only;
00099 double count_control_only1;
00100
00101
00102 TIMESTAMP next_change_time;
00103
00104
00105 double stall_voltage;
00106 double start_voltage;
00107 complex stall_impedance;
00108 double trip_delay;
00109 double reset_delay;
00110 double heat_fraction;
00111
00112
00113
00114 double energy_baseline;
00115 double energy_used;
00116 double actual_dishwasher_demand;
00117 double pulse_interval[19];
00118
00119
00120
00121 double energy_needed;
00122 double total_power;
00123 double motor_on_off;
00124 double motor_coil_on_off;
00125 double both_coils_on_off;
00126
00127
00128
00129 TIMESTAMP time_state;
00130
00131 TIMESTAMP return_time;
00132
00133 public:
00134 static CLASS *oclass, *pclass;
00135 static dishwasher *defaults;
00136
00137 dishwasher(MODULE *module);
00138 ~dishwasher();
00139 int create();
00140 int init(OBJECT *parent);
00141 int isa(char *classname);
00142 TIMESTAMP last_t;
00143 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00144 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00145 double update_state(double dt);
00146
00147 };
00148
00149 #endif // _dishwasher_H
00150