00001
00002
00003
00004 #ifndef _TRIPLEXLOAD_H
00005 #define _TRIPLEXLOAD_H
00006
00007 #include "triplex_node.h"
00008
00009 EXPORT SIMULATIONMODE interupdate_triplex_load(OBJECT *obj, unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val, bool interupdate_pos);
00010
00011 class triplex_load : public triplex_node
00012 {
00013 public:
00014 static CLASS *oclass;
00015 static CLASS *pclass;
00016 private:
00017 bool base_load_val_was_nonzero[3];
00018
00019 public:
00020 complex measured_voltage_1;
00021 complex measured_voltage_2;
00022 complex measured_voltage_12;
00023 complex constant_power[3];
00024 complex constant_current[3];
00025 complex constant_impedance[3];
00026
00027 double base_power[3];
00028 double power_pf[3];
00029 double current_pf[3];
00030 double impedance_pf[3];
00031 double power_fraction[3];
00032 double impedance_fraction[3];
00033 double current_fraction[3];
00034
00035 enum {LC_UNKNOWN=0, LC_RESIDENTIAL, LC_COMMERCIAL, LC_INDUSTRIAL, LC_AGRICULTURAL};
00036 enumeration load_class;
00037 enum {DISCRETIONARY=0, PRIORITY, CRITICAL};
00038 enumeration load_priority;
00039
00040 int create(void);
00041 int init(OBJECT *parent);
00042
00043 void triplex_load_update_fxn(void);
00044 void triplex_load_delete_update_fxn(void);
00045
00046 triplex_load(MODULE *mod);
00047 TIMESTAMP sync(TIMESTAMP t0);
00048 TIMESTAMP postsync(TIMESTAMP t0);
00049 TIMESTAMP presync(TIMESTAMP t0);
00050 inline triplex_load(CLASS *cl=oclass):triplex_node(cl){};
00051 int isa(char *classname);
00052
00053 SIMULATIONMODE inter_deltaupdate_triplex_load(unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val, bool interupdate_pos);
00054 };
00055
00056 #endif // _TRIPLEX_LOAD_H
00057