00001 00006 #ifndef _EVCHARGER_DET_H 00007 #define _EVCHARGER_DET_H 00008 00009 #include "residential.h" 00010 #include "residential_enduse.h" 00011 00012 typedef enum { 00013 VL_UNKNOWN=0, 00014 VL_HOME=1, 00015 VL_WORK=2, 00016 VL_WORK_TO_HOME=3, 00017 VL_HOME_TO_WORK=4 00018 } VEHICLELOCATION; 00019 00020 typedef struct { 00021 double travel_distance; 00022 double WorkArrive; 00023 double WorkDuration; 00024 double WorkHomeDuration; 00025 double HomeArrive; 00026 double HomeDuration; 00027 double HomeWorkDuration; 00028 enumeration Location; 00029 double battery_capacity; 00030 double battery_SOC; 00031 double battery_size; 00032 double MaxChargeRate; 00033 double ChargeEfficiency; 00034 double mileage_efficiency; 00035 TIMESTAMP next_state_change; 00036 } VEHICLEDATA; 00037 00038 class evcharger_det : public residential_enduse 00039 { 00040 public: 00041 00042 double ChargeRate; 00043 00044 double variation_mean; 00045 double variation_std_dev; 00046 00047 double variation_trip_mean; 00048 double variation_trip_std_dev; 00049 00050 double mileage_classification; 00051 00052 bool Work_Charge_Available; 00053 00054 char1024 NHTSDataFile; 00055 unsigned int VehicleLocation; 00056 00057 VEHICLEDATA CarInformation; 00058 00059 static CLASS *oclass, *pclass; 00060 00061 evcharger_det(MODULE *module); 00062 ~evcharger_det(); 00063 int create(); 00064 int init(OBJECT *parent); 00065 int isa(char *classname); 00066 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1); 00067 00068 private: 00069 TIMESTAMP glob_min_timestep; 00070 bool off_nominal_time; 00071 00072 TIMESTAMP prev_time; 00073 00074 }; 00075 00076 #endif // _EVCHARGER_DET_H 00077