powerflow/capacitor.h

00001 // $Id: capacitor.h,v 1.5 2008/02/04 23:08:12 natet Exp $
00002 
00003 #ifndef _CAPACITOR_H
00004 #define _CAPACITOR_H
00005 
00006 #include "powerflow.h"
00007 #include "node.h"
00008 
00009 class capacitor : public node
00010 {
00011 public:
00012     typedef enum {MANUAL=0, VAR=1, VOLT=2, VARVOLT=3} CAPCONTROL;
00013     typedef enum {OPEN=0, CLOSED=1} CAPSWITCH;
00014 protected:
00015     CAPSWITCH switch_state;     // capacitor switch open or close
00016     complex q_node[3];          // 3x1 matrix, Q of node
00017     complex b_node[3];          // 3x1 matrix, B of node
00018     complex q_cap[3];           // 3x1 matrix, Q of cap
00019     CAPCONTROL control;         // control operation strategy; 0 - manual, 1 - VAr, 2- voltage, 3 - VAr primary,voltage backup.
00020     double var_close;           // VAr close limit
00021     double var_open;            // VAr open limit
00022     double volt_close;          // volt close limit
00023     double volt_open;           // volt open limit
00024     int32 pt_ratio;             // control PT ratio
00025     set pt_phase;               // phase PT on
00026     int32 time_delay;           // control time delay
00027     double time_to_change;      // time for state to change
00028 
00029 public:
00030     int create(void);
00031     TIMESTAMP sync(TIMESTAMP t0);
00032     TIMESTAMP postsync(TIMESTAMP t0);
00033     capacitor(MODULE *mod);
00034     int isa(char *classname);
00035 
00036 public:
00037     static CLASS *pclass;
00038     static CLASS *oclass;
00039     static capacitor *defaults;
00040 };
00041 
00042 #endif // _CAPACITOR_H

GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy