CDPSM_to_GLM.GldNode

static class GldNode

Helper class to accumulate nodes and loads.

All EnergyConsumer data will be attached to node objects, then written as load objects. This preserves the input ConnectivityNode names

TODO - another option is to leave all nodes un-loaded, and attach all loads to parent nodes, closer to what OpenDSS does

Fields

bDelta

public boolean bDelta

will add N or D phasing, if not S

bSecondary

public boolean bSecondary

if bSecondary true, the member variables for phase A and B loads actually correspond to secondary phases 1 and 2. For GridLAB-D, these are written to phase AS, BS or CS, depending on the primary phase, which we find from the service transformer or triplex.

bSwing

public boolean bSwing

denotes the SWING bus, aka substation source bus

name

public final String name

root name of the node (or load), will have nd_ prepended

nomvln

public double nomvln

this nominal voltage is always line-to-neutral

pa_i

public double pa_i

real power on phase A or s1, constant current portion

pa_p

public double pa_p

real power on phase A or s1, constant power portion

pa_z

public double pa_z

real power on phase A or s1, constant impedance portion

pb_i

public double pb_i

real power on phase B or s2, constant current portion

pb_p

public double pb_p

real power on phase B or s2, constant power portion

pb_z

public double pb_z

real power on phase B or s2, constant impedance portion

pc_i

public double pc_i

real power on phase C, constant current portion

pc_p

public double pc_p

real power on phase C, constant power portion

pc_z

public double pc_z

real power on phase C, constant impedance portion

phases

public String phases

ABC allowed

qa_i

public double qa_i

reactive power on phase A or s1, constant current portion

qa_p

public double qa_p

reactive power on phase A or s1, constant power portion

qa_z

public double qa_z

reactive power on phase A or s1, constant impedance portion

qb_i

public double qb_i

reactive power on phase B or s2, constant current portion

qb_p

public double qb_p

reactive power on phase B or s2, constant power portion

qb_z

public double qb_z

reactive power on phase B or s2, constant impedance portion

qc_i

public double qc_i

reactive power on phase C, constant current portion

qc_p

public double qc_p

reactive power on phase C, constant power portion

qc_z

public double qc_z

reactive power on phase C, constant impedance portion

Constructors

GldNode

public GldNode(String name)

constructor defaults to zero load and zero phases present

Parameters:
  • name – CIM name of the bus

Methods

AddPhases

public boolean AddPhases(String phs)

accumulates phases present

Parameters:
  • phs – phases to add, may contain ABCDSs
Returns:

always true

ApplyZIP

public void ApplyZIP(double Z, double I, double P)

reapportion loads according to constant power (Z/sum), constant current (I/sum) and constant power (P/sum)

Parameters:
  • Z – portion of constant-impedance load
  • I – portion of constant-current load
  • P – portion of constant-power load

GetPhases

public String GetPhases()
Returns:phasing string for GridLAB-D with appropriate D, S or N suffix

HasLoad

public boolean HasLoad()
Returns:true if a non-zero real or reactive load on any phase

RescaleLoad

public void RescaleLoad(double scale)

scales the load by a factor that probably came from the command line’s -l option

Parameters:
  • scale – multiplying factor on all of the load components