00001
00002
00003
00004 #ifndef _LOAD_H
00005 #define _LOAD_H
00006
00007 #include "node.h"
00008
00009 EXPORT SIMULATIONMODE interupdate_load(OBJECT *obj, unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val, bool interupdate_pos);
00010
00011 class load : public node
00012 {
00013 public:
00014 static CLASS *oclass;
00015 static CLASS *pclass;
00016 private:
00017 complex prev_shunt[3];
00018
00019 bool base_load_val_was_nonzero[3];
00020
00021 public:
00022 complex measured_voltage_A;
00023 complex measured_voltage_B;
00024 complex measured_voltage_C;
00025 complex measured_voltage_AB;
00026 complex measured_voltage_BC;
00027 complex measured_voltage_CA;
00028 complex constant_power[3];
00029 complex constant_current[3];
00030 complex constant_impedance[3];
00031 complex constant_power_dy[6];
00032 complex constant_current_dy[6];
00033 complex constant_impedance_dy[6];
00034 INRUSHINTMETHOD inrush_int_method_inductance;
00035 INRUSHINTMETHOD inrush_int_method_capacitance;
00036
00037 double base_power[3];
00038 double power_pf[3];
00039 double current_pf[3];
00040 double impedance_pf[3];
00041 double power_fraction[3];
00042 double impedance_fraction[3];
00043 double current_fraction[3];
00044 bool three_phase_protect;
00045
00046 enum {LC_UNKNOWN=0, LC_RESIDENTIAL, LC_COMMERCIAL, LC_INDUSTRIAL, LC_AGRICULTURAL};
00047 enumeration load_class;
00048 enum {DISCRETIONARY=0, PRIORITY, CRITICAL};
00049 enumeration load_priority;
00050
00051 int create(void);
00052 int init(OBJECT *parent);
00053
00054 void load_update_fxn(bool fault_mode);
00055 void load_delete_update_fxn(void);
00056 SIMULATIONMODE inter_deltaupdate_load(unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val, bool interupdate_pos);
00057
00058 load(MODULE *mod);
00059 TIMESTAMP sync(TIMESTAMP t0);
00060 TIMESTAMP postsync(TIMESTAMP t0);
00061 TIMESTAMP presync(TIMESTAMP t0);
00062 inline load(CLASS *cl=oclass):node(cl){};
00063 int isa(char *classname);
00064 int notify(int update_mode, PROPERTY *prop, char *value);
00065 int kmldata(int (*stream)(const char*,...));
00066 };
00067
00068 #endif // _LOAD_H