00001
00002
00003
00004 #ifndef _REGULATORCONFIGURATION_H
00005 #define _REGULATORCONFIGURATION_H
00006
00007 #include "powerflow.h"
00008 #include "powerflow_library.h"
00009
00010 class regulator_configuration : public powerflow_library
00011 {
00012 public:
00013 typedef enum {
00014 WYE_WYE=1,
00015 OPEN_DELTA_ABBC,
00016 OPEN_DELTA_BCAC,
00017 OPEN_DELTA_CABA,
00018 CLOSED_DELTA,
00019 CONNECT_TYPE_MAX
00020 } connect_type_enum;
00021
00022 typedef enum {
00023 MANUAL=1,
00024 OUTPUT_VOLTAGE=2,
00025 REMOTE_NODE=3,
00026 LINE_DROP_COMP=4
00027 } Control_enum;
00028
00029 typedef enum {
00030 INDIVIDUAL=1,
00031 BANK=2
00032 } control_level_enum;
00033
00034 typedef enum {
00035 A = 1,
00036 B
00037 } Type_enum;
00038
00039
00040
00041 Control_enum Control;
00042 control_level_enum control_level;
00043 Type_enum Type;
00044 connect_type_enum connect_type;
00045
00046
00047 inline const char *get_name(void) const { static char tmp[64]; OBJECT *obj=OBJECTHDR(this); return obj->name?obj->name:(sprintf(tmp,"%s:%d",obj->oclass->name,obj->id)>0?tmp:"(unknown)");};
00048
00049 inline unsigned int get_id(void) const {return OBJECTHDR(this)->id;};
00050
00051 double band_center;
00052 double band_width;
00053 double dwell_time;
00054 double time_delay;
00055 int16 raise_taps;
00056 int16 lower_taps;
00057 double CT_ratio;
00058 double PT_ratio;
00059 double ldc_R_V[3];
00060 double ldc_X_V[3];
00061 set CT_phase;
00062 set PT_phase;
00063 double regulation;
00064 int16 tap_pos[3];
00065
00066 #define ldc_R_V_A ldc_R_V[0] // R for each phase
00067 #define ldc_R_V_B ldc_R_V[1]
00068 #define ldc_R_V_C ldc_R_V[2]
00069 #define ldc_X_V_A ldc_X_V[0] // X for each phase
00070 #define ldc_X_V_B ldc_X_V[1]
00071 #define ldc_X_V_C ldc_X_V[2]
00072 #define tap_posA tap_pos[0] // tap_pos of phase A
00073 #define tap_posB tap_pos[1] // tap_pos of phase B
00074 #define tap_posC tap_pos[2] // tap_pos of phase C
00075
00076 public:
00077 static CLASS *oclass;
00078 static CLASS *pclass;
00079 regulator_configuration(MODULE *mod);
00080 inline regulator_configuration(CLASS *cl=oclass):powerflow_library(cl){};
00081 int create(void);
00082 int init(OBJECT *parent);
00083 int isa(char *classname);
00084 };
00085
00086
00087 #endif // _REGULATORCONFIGURATION_H