Class GldNode


  • public class GldNode
    extends java.lang.Object
    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

    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean bDelta
      reactive power on phase s12, constant power portion
      boolean bSecondary
      if bSecondary true, the member variables for phase A and B loads actually correspond to secondary phases 1 and 2.
      boolean bSolarInverters
      signifies there are solar PV inverters connected to this bus
      boolean bStorageInverters
      signifies are battery inverters connected to this bus
      boolean bSwing
      denotes the SWING bus, aka substation source bus
      boolean bSwingPQ
      signifies local DER that can support an island
      boolean bSyncMachines
      signifies there are synchronous machines connected to this bus
      boolean bTertiaryWinding
      signifies this bus is connected to a tertiary (or higher) transformer winding, which is not supported in GridLAB-D.
      java.lang.String loadname
      name of the load, if any, will have `ld_` prepended
      java.lang.String name
      root name of the node or meter, will have `nd_` prepended
      double nomvln
      this nominal voltage is always line-to-neutral
      double pa_i
      real power on phase A, constant current portion
      double pa_p
      real power on phase A, constant power portion
      double pa_z
      real power on phase A, constant impedance portion
      double pb_i
      real power on phase B, constant current portion
      double pb_p
      real power on phase B, constant power portion
      double pb_z
      real power on phase B, constant impedance portion
      double pc_i
      real power on phase C, constant current portion
      double pc_p
      real power on phase C, constant power portion
      double pc_z
      real power on phase C, constant impedance portion
      java.lang.String phases
      ABC allowed
      double ps1_i
      reactive power on phase s12, constant impedance portion
      double ps1_p
      reactive power on phase s12, constant current portion
      double ps1_z
      for loads, will add N or D phasing, if not S
      double ps12_i
      real power on phase s2, constant current portion
      double ps12_p
      real power on phase s2, constant power portion
      double ps12_z
      real power on phase s2, constant impedance portion
      double ps2_i
      real power on phase s1, constant current portion
      double ps2_p
      real power on phase s1, constant power portion
      double ps2_z
      real power on phase s1, constant impedance portion
      double qa_i
      reactive power on phase A, constant current portion
      double qa_p
      reactive power on phase A, constant power portion
      double qa_z
      reactive power on phase A, constant impedance portion
      double qb_i
      reactive power on phase B, constant current portion
      double qb_p
      reactive power on phase B, constant power portion
      double qb_z
      reactive power on phase B, constant impedance portion
      double qc_i
      reactive power on phase C, constant current portion
      double qc_p
      reactive power on phase C, constant power portion
      double qc_z
      reactive power on phase C, constant impedance portion
      double qs1_i
      real power on phase s12, constant current portion
      double qs1_p
      real power on phase s12, constant power portion
      double qs1_z
      real power on phase s12, constant impedance portion
      double qs12_i
      reactive power on phase s2, constant current portion
      double qs12_p
      reactive power on phase s2, constant power portion
      double qs12_z
      reactive power on phase s2, constant impedance portion
      double qs2_i
      reactive power on phase s1, constant current portion
      double qs2_p
      reactive power on phase s1, constant power portion
      double qs2_z
      reactive power on phase s1, constant impedance portion
    • Constructor Summary

      Constructors 
      Constructor Description
      GldNode​(java.lang.String name)
      constructor defaults to zero load and zero phases present
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void AccumulateLoads​(java.lang.String ldname, java.lang.String phs, java.lang.String conn, double pL, double qL, double Pv, double Qv, double Pz, double Pi, double Pp, double Qz, double Qi, double Qp, boolean randomZIP)
      Distributes a total load (pL+jqL) among the phases (phs) present on GridLAB-D node
      boolean AddPhases​(java.lang.String phs)
      accumulates phases present
      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)
      boolean CopyLoad​(GldNode src)  
      java.lang.String DisplayString()  
      java.lang.String GetGLM​(double load_scale, boolean bWantSched, java.lang.String fSched, boolean bWantZIP, boolean useHouses, double Zcoeff, double Icoeff, double Pcoeff, boolean bLoadMeters)  
      java.lang.String GetPhases​(boolean bForLoad)  
      boolean HasLoad()  
      void RescaleLoad​(double scale)
      scales the load by a factor that probably came from the command line's -l option
      boolean ResetPhases​(java.lang.String phs)  
      double TotalLoadReactivePower()  
      double TotalLoadRealPower()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        public final java.lang.String name
        root name of the node or meter, will have `nd_` prepended
      • loadname

        public java.lang.String loadname
        name of the load, if any, will have `ld_` prepended
      • phases

        public java.lang.String phases
        ABC allowed
      • nomvln

        public double nomvln
        this nominal voltage is always line-to-neutral
      • pa_z

        public double pa_z
        real power on phase A, constant impedance portion
      • pb_z

        public double pb_z
        real power on phase B, constant impedance portion
      • pc_z

        public double pc_z
        real power on phase C, constant impedance portion
      • qa_z

        public double qa_z
        reactive power on phase A, constant impedance portion
      • qb_z

        public double qb_z
        reactive power on phase B, constant impedance portion
      • qc_z

        public double qc_z
        reactive power on phase C, constant impedance portion
      • pa_i

        public double pa_i
        real power on phase A, constant current portion
      • pb_i

        public double pb_i
        real power on phase B, constant current portion
      • pc_i

        public double pc_i
        real power on phase C, constant current portion
      • qa_i

        public double qa_i
        reactive power on phase A, constant current portion
      • qb_i

        public double qb_i
        reactive power on phase B, constant current portion
      • qc_i

        public double qc_i
        reactive power on phase C, constant current portion
      • pa_p

        public double pa_p
        real power on phase A, constant power portion
      • pb_p

        public double pb_p
        real power on phase B, constant power portion
      • pc_p

        public double pc_p
        real power on phase C, constant power portion
      • qa_p

        public double qa_p
        reactive power on phase A, constant power portion
      • qb_p

        public double qb_p
        reactive power on phase B, constant power portion
      • qc_p

        public double qc_p
        reactive power on phase C, constant power portion
      • ps1_z

        public double ps1_z
        for loads, will add N or D phasing, if not S
      • ps2_z

        public double ps2_z
        real power on phase s1, constant impedance portion
      • ps12_z

        public double ps12_z
        real power on phase s2, constant impedance portion
      • qs1_z

        public double qs1_z
        real power on phase s12, constant impedance portion
      • qs2_z

        public double qs2_z
        reactive power on phase s1, constant impedance portion
      • qs12_z

        public double qs12_z
        reactive power on phase s2, constant impedance portion
      • ps1_i

        public double ps1_i
        reactive power on phase s12, constant impedance portion
      • ps2_i

        public double ps2_i
        real power on phase s1, constant current portion
      • ps12_i

        public double ps12_i
        real power on phase s2, constant current portion
      • qs1_i

        public double qs1_i
        real power on phase s12, constant current portion
      • qs2_i

        public double qs2_i
        reactive power on phase s1, constant current portion
      • qs12_i

        public double qs12_i
        reactive power on phase s2, constant current portion
      • ps1_p

        public double ps1_p
        reactive power on phase s12, constant current portion
      • ps2_p

        public double ps2_p
        real power on phase s1, constant power portion
      • ps12_p

        public double ps12_p
        real power on phase s2, constant power portion
      • qs1_p

        public double qs1_p
        real power on phase s12, constant power portion
      • qs2_p

        public double qs2_p
        reactive power on phase s1, constant power portion
      • qs12_p

        public double qs12_p
        reactive power on phase s2, constant power portion
      • bDelta

        public boolean bDelta
        reactive power on phase s12, constant power portion
      • bSwing

        public boolean bSwing
        denotes the SWING bus, aka substation source bus
      • bSolarInverters

        public boolean bSolarInverters
        signifies there are solar PV inverters connected to this bus
      • bStorageInverters

        public boolean bStorageInverters
        signifies are battery inverters connected to this bus
      • bSyncMachines

        public boolean bSyncMachines
        signifies there are synchronous machines connected to this bus
      • bSwingPQ

        public boolean bSwingPQ
        signifies local DER that can support an island
      • bTertiaryWinding

        public boolean bTertiaryWinding
        signifies this bus is connected to a tertiary (or higher) transformer winding, which is not supported in GridLAB-D.
      • 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.
    • Constructor Detail

      • GldNode

        public GldNode​(java.lang.String name)
        constructor defaults to zero load and zero phases present
        Parameters:
        name - CIM name of the bus
    • Method Detail

      • TotalLoadRealPower

        public double TotalLoadRealPower()
      • TotalLoadReactivePower

        public double TotalLoadReactivePower()
      • DisplayString

        public java.lang.String DisplayString()
      • AddPhases

        public boolean AddPhases​(java.lang.String phs)
        accumulates phases present
        Parameters:
        phs - phases to add, may contain ABCDNSs in any order
        Returns:
        always true
      • ResetPhases

        public boolean ResetPhases​(java.lang.String phs)
      • GetPhases

        public java.lang.String GetPhases​(boolean bForLoad)
        Parameters:
        bForLoad - true if this node may have load connected, i.e., D phasing applies
        Returns:
        phasing string for GridLAB-D with appropriate D, S or N suffix
      • AccumulateLoads

        public void AccumulateLoads​(java.lang.String ldname,
                                    java.lang.String phs,
                                    java.lang.String conn,
                                    double pL,
                                    double qL,
                                    double Pv,
                                    double Qv,
                                    double Pz,
                                    double Pi,
                                    double Pp,
                                    double Qz,
                                    double Qi,
                                    double Qp,
                                    boolean randomZIP)
        Distributes a total load (pL+jqL) among the phases (phs) present on GridLAB-D node
        Parameters:
        phs - phases actually present at the node
        pL - total real power
        qL - total reactive power
        Pv - real power voltage exponent from a CIM LoadResponseCharacteristic
        Qv - reactive power voltage exponent from a CIM LoadResponseCharacteristic
        Pz - real power constant-impedance percentage from a CIM LoadResponseCharacteristic
        Qz - reactive power constant-impedance percentage from a CIM LoadResponseCharacteristic
        Pi - real power constant-current percentage from a CIM LoadResponseCharacteristic
        Qi - reactive power constant-current percentage from a CIM LoadResponseCharacteristic
        Pp - real power constant-power percentage from a CIM LoadResponseCharacteristic
        Qp - reactive power constant-power percentage from a CIM LoadResponseCharacteristic
        ldname - name of the load to prepend with ld_
        conn - D for delta, otherwise wye
        randomZIP - true to randomize the ZIP coefficients
      • 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
      • 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
      • HasLoad

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

        public boolean CopyLoad​(GldNode src)
      • GetGLM

        public java.lang.String GetGLM​(double load_scale,
                                       boolean bWantSched,
                                       java.lang.String fSched,
                                       boolean bWantZIP,
                                       boolean useHouses,
                                       double Zcoeff,
                                       double Icoeff,
                                       double Pcoeff,
                                       boolean bLoadMeters)