Capacitor
[Distribution flow solver (network)]


Functions

 capacitor::capacitor (MODULE *mod)
 constructor.
int capacitor::create (void)
EXPORT int create_capacitor (OBJECT **obj, OBJECT *parent)
 REQUIRED: allocate and initialize an object.
EXPORT int init_capacitor (OBJECT *obj)
 Object initialization is called once after all object have been created.
int capacitor::isa (char *classname)
EXPORT int isa_capacitor (OBJECT *obj, char *classname)
 Allows the core to discover whether obj is a subtype of this class.
TIMESTAMP capacitor::postsync (TIMESTAMP t0)
TIMESTAMP capacitor::sync (TIMESTAMP t0)
EXPORT TIMESTAMP sync_capacitor (OBJECT *obj, TIMESTAMP t0, PASSCONFIG pass)
 Sync is called when the clock needs to advance on the bottom-up pass (PC_BOTTOMUP).

Variables

static capacitorcapacitor::defaults = NULL
static CLASScapacitor::oclass = NULL
static CLASScapacitor::pclass = NULL


Function Documentation

capacitor::capacitor ( MODULE mod  )  [inherited]

constructor.

Class registration is only called once to register the class with the core. Include parent class constructor (node)

Parameters:
module a module structure maintained by the core

Definition at line 29 of file capacitor.cpp.

References CLOSED, control, defaults, gl_publish_variable, gl_register_class, GL_THROW, MANUAL, node::oclass, oclass, OPEN, PADDR, PC_BOTTOMUP, PC_POSTTOPDOWN, pclass, PHASE_A, PHASE_B, PHASE_C, PHASE_D, PHASE_N, PHASE_S, node::phaseA_V, node::phaseB_V, node::phaseC_V, powerflow_object::phases, PT_complex, PT_double, PT_enumeration, PT_KEYWORD, pt_phase, pt_ratio, PT_set, switch_state, node::sync_V_limit, time_delay, time_to_change, VAR, var_close, var_open, VARVOLT, VOLT, volt_close, and volt_open.

EXPORT int create_capacitor ( OBJECT **  obj,
OBJECT parent 
)

REQUIRED: allocate and initialize an object.

Parameters:
obj a pointer to a pointer of the last object in the list
parent a pointer to the parent of this object
Returns:
1 for a successfully created object, 0 for error

Definition at line 150 of file capacitor.cpp.

References create(), gl_create_object, gl_error, gl_set_parent, OBJECTDATA, and oclass.

EXPORT int init_capacitor ( OBJECT obj  ) 

Object initialization is called once after all object have been created.

Parameters:
parent a pointer to this object's parent
Returns:
1 on success, 0 on error

Definition at line 177 of file capacitor.cpp.

References powerflow_object::get_id(), powerflow_object::get_name(), GL_THROW, node::init(), OBJECTDATA, and s_object_list::parent.

EXPORT int isa_capacitor ( OBJECT obj,
char *  classname 
)

Allows the core to discover whether obj is a subtype of this class.

Parameters:
obj a pointer to this object
classname the name of the object the core is testing
Returns:
0 if obj is a subtype of this class

Definition at line 231 of file capacitor.cpp.

References OBJECTDATA.

TIMESTAMP capacitor::sync ( TIMESTAMP  t0  )  [inherited]

Todo:
implement capacity manual control closed (ticket #189)

Todo:
implement capacity var control closed (ticket #190)

Todo:
implement capacity volt control closed (ticket #191)

Todo:
implement capacity varvolt control closed (ticket #192)

Todo:
implement capacity manual control open (ticket #193)

Todo:
implement capacity var control open (ticket #194)

Todo:
implement capacity volt control open (ticket #195)

Todo:
implement capacity varvolt control open (ticket #196)

Reimplemented from node.

Definition at line 89 of file capacitor.cpp.

References CLOSED, control, MANUAL, switch_state, node::sync(), VAR, VARVOLT, and VOLT.

Referenced by sync_capacitor().

EXPORT TIMESTAMP sync_capacitor ( OBJECT obj,
TIMESTAMP  t0,
PASSCONFIG  pass 
)

Sync is called when the clock needs to advance on the bottom-up pass (PC_BOTTOMUP).

Parameters:
t0 this objects current timestamp
t1 the timestamp which the object should move forward to
Returns:
t2, where t2>t1 on success, t2=t1 for retry, t2<t1 on failure

Definition at line 197 of file capacitor.cpp.

References s_object_list::clock, powerflow_object::get_id(), powerflow_object::get_name(), GL_THROW, OBJECTDATA, PC_BOTTOMUP, PC_POSTTOPDOWN, PC_PRETOPDOWN, postsync(), node::presync(), sync(), and TS_NEVER.


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