Skip to content

Class: Linecode

A Linecode object in OpenDSS defining per-unit-length impedance data shared by multiple lines. Depending on whether sequence impedances or matrices are provided, the converter creates either a PerLengthSequenceImpedance or a PerLengthPhaseImpedance + PhaseImpedanceData.

URI: dss:Linecode

 classDiagram
    class Linecode
    click Linecode href "../Linecode/"
      Linecode : B0

      Linecode : B1

      Linecode : baseFreq

      Linecode : C0

      Linecode : C1

      Linecode : cmatrix

      Linecode : emergamps

      Linecode : faultrate

      Linecode : Kron

      Linecode : like

      Linecode : LineType

      Linecode : name

      Linecode : neutral

      Linecode : normamps

      Linecode : nphases

      Linecode : pctperm

      Linecode : r0

      Linecode : r1

      Linecode : Ratings

      Linecode : repair

      Linecode : Rg

      Linecode : rho

      Linecode : rmatrix

      Linecode : Seasons

      Linecode : units

      Linecode : x0

      Linecode : x1

      Linecode : Xg

      Linecode : xmatrix

Class Properties

Property Value
Class URI dss:Linecode

Slots

Name Cardinality and Range Description Inheritance
name 1
String
Object name direct
nphases 0..1
Integer
Number of phases in the line this line code data represents direct
r1 0..1
Float
Positive-sequence Resistance, ohms per unit length direct
x1 0..1
Float
Positive-sequence Reactance, ohms per unit length direct
r0 0..1
Float
Zero-sequence Resistance, ohms per unit length direct
x0 0..1
Float
Zero-sequence Reactance, ohms per unit length direct
C1 0..1
Float
Positive-sequence capacitance, nf per unit length direct
C0 0..1
Float
Zero-sequence capacitance, nf per unit length direct
units 0..1
String
One of (none mi
rmatrix *
Float
Resistance matrix, lower triangle, ohms per unit length direct
xmatrix *
Float
Reactance matrix, lower triangle, ohms per unit length direct
cmatrix *
Float
Nodal Capacitance matrix, lower triangle, nf per unit length direct
baseFreq 0..1
Float
Frequency at which impedances are specified direct
normamps 0..1
Float
Normal ampere limit on line direct
emergamps 0..1
Float
Emergency ampere limit on line (usually one-hour rating) direct
faultrate 0..1
Float
Number of faults per unit length per year direct
pctperm 0..1
Float
Percentage of the faults that become permanent direct
repair 0..1
Float
Hours to repair direct
Kron 0..1
Boolean
Kron = Y/N direct
Rg 0..1
Float
Carson earth return resistance per unit length used to compute impedance valu... direct
Xg 0..1
Float
Carson earth return reactance per unit length used to compute impedance value... direct
rho 0..1
Float
Default=100 meter ohms direct
neutral 0..1
Integer
Designates which conductor is the neutral conductor that will be eliminated b... direct
B1 0..1
Float
Alternate way to specify C1 direct
B0 0..1
Float
Alternate way to specify C0 direct
Seasons 0..1
Integer
Defines the number of ratings to be defined for the wire, to be used only whe... direct
Ratings *
Float
An array of ratings to be used when the seasonal ratings flag is True direct
LineType 0..1
String
Code designating the type of line direct
like 0..1
String
Make like another object, e direct

Comments

  • Import: a LineCode becomes a template PerLengthSequenceImpedance (r1/x1/r0/x0 with C1, C0 or B1, B0), or a PerLengthPhaseImpedance with PhaseImpedanceData rows (rmatrix/xmatrix/cmatrix), plus its WireConfiguration lc__wc (isTemplate=true), in linecode.cimtbl. Values are copied per length in the code's units.
  • Export: every template PerLengthImpedance is written as a LineCode per metre, C from b at the network's base frequency (exporter/linecode.py).

Identifier and Mapping Information

Schema Source

  • from schema: https://gridappsd.github.io/dss-graph/opendss

Mappings

Mapping Type Mapped Value
self dss:Linecode
native dss:Linecode
related cim:WireConfiguration
close cim:PerLengthSequenceImpedance, cim:PerLengthPhaseImpedance

LinkML Source

Direct

name: Linecode
description: A Linecode object in OpenDSS defining per-unit-length impedance data
  shared by multiple lines. Depending on whether sequence impedances or matrices are
  provided, the converter creates either a PerLengthSequenceImpedance or a PerLengthPhaseImpedance
  + PhaseImpedanceData.
comments:
- 'Import: a LineCode becomes a template PerLengthSequenceImpedance (r1/x1/r0/x0 with
  C1, C0 or B1, B0), or a PerLengthPhaseImpedance with PhaseImpedanceData rows (rmatrix/xmatrix/cmatrix),
  plus its WireConfiguration lc_<name>_wc (isTemplate=true), in linecode.cimtbl. Values
  are copied per length in the code''s units.'
- 'Export: every template PerLengthImpedance is written as a LineCode per metre, C
  from b at the network''s base frequency (exporter/linecode.py).'
from_schema: https://gridappsd.github.io/dss-graph/opendss
close_mappings:
- cim:PerLengthSequenceImpedance
- cim:PerLengthPhaseImpedance
related_mappings:
- cim:WireConfiguration
attributes:
  name:
    name: name
    description: Object name. Must be unique per object type.
    comments:
    - 'Import: copied to PerLengthPhaseImpedance.name, PerLengthSequenceImpedance.name,
      WireConfiguration.name; mRID = lc_ + name, lowercased. Export: Names.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:IdentifiedObject.name
    identifier: true
    domain_of:
    - Load
    - Generator
    - Generic5
    - Gicline
    - Indmach012
    - Pvsystem
    - Storage
    - Upfc
    - Vccs
    - Vsconverter
    - Windgen
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Capcontrol
    - Espvlcontrol
    - Expcontrol
    - Fuse
    - Gendispatcher
    - Invcontrol
    - Pycontrol
    - Recloser
    - Regcontrol
    - Relay
    - Storagecontroller
    - Swtcontrol
    - Upfccontrol
    - Buscoords
    - Cndata
    - Dynamicexp
    - Growthshape
    - Linecode
    - Linegeometry
    - Linespacing
    - Loadshape
    - Priceshape
    - Spectrum
    - TccCurve
    - Tsdata
    - Tshape
    - Wiredata
    - Xfmrcode
    - Xycurve
    - Energymeter
    - Fmonitor
    - Monitor
    - Sensor
    - Fault
    - Gicsource
    - Isource
    - Options
    - Vsource
    range: string
    required: true
  nphases:
    name: nphases
    annotations:
      order:
        tag: order
        value: 1
      dss_default:
        tag: dss_default
        value: int(3)
    description: Number of phases in the line this line code data represents. Default
      is 3.
    comments:
    - 'Import: copied to PerLengthPhaseImpedance.conductorCount (the matrix order);
      a 1- or 2-phase sequence code becomes a phase matrix as the engine builds the
      line. Export: phase code: conductorCount; sequence code: 3.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthPhaseImpedance.conductorCount
    rank: 1000
    domain_of:
    - Linecode
    - Linegeometry
    - Linespacing
    range: integer
    required: false
    minimum_value: 1
    maximum_value: 3
  r1:
    name: r1
    annotations:
      order:
        tag: order
        value: 2
      dss_default:
        tag: dss_default
        value: float(0.058)
    description: Positive-sequence Resistance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.r (ohm/<units>). Export: sequence
      code: r (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.r
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  x1:
    name: x1
    annotations:
      order:
        tag: order
        value: 3
      dss_default:
        tag: dss_default
        value: float(0.1206)
    description: Positive-sequence Reactance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.x (ohm/<units>). Export: sequence
      code: x (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.x
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  r0:
    name: r0
    annotations:
      order:
        tag: order
        value: 4
      dss_default:
        tag: dss_default
        value: float(0.1784)
    description: Zero-sequence Resistance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.r0 (ohm/<units>). Export: sequence
      code: r0 (ohm/m); unset raises.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.r0
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  x0:
    name: x0
    annotations:
      order:
        tag: order
        value: 5
      dss_default:
        tag: dss_default
        value: float(0.4047)
    description: Zero-sequence Reactance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.x0 (ohm/<units>). Export: sequence
      code: x0 (ohm/m); unset raises.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.x0
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  C1:
    name: C1
    annotations:
      order:
        tag: order
        value: 6
      dss_default:
        tag: dss_default
        value: float(3.4)
    description: Positive-sequence capacitance, nf per unit length.
    comments:
    - 'Import: derived; PerLengthSequenceImpedance bch = 2 pi baseFreq C1 (b_from_c):
      nF -> nS. Export: rule, sequence code: c_from_b(bch) (nF/m); unset -> 0.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthSequenceImpedance.bch
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  C0:
    name: C0
    annotations:
      order:
        tag: order
        value: 7
      dss_default:
        tag: dss_default
        value: float(1.6)
    description: Zero-sequence capacitance, nf per unit length.
    comments:
    - 'Import: derived; PerLengthSequenceImpedance b0ch = 2 pi baseFreq C0 (b_from_c):
      nF -> nS. Export: rule, sequence code: c_from_b(b0ch) (nF/m); unset -> 0.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthSequenceImpedance.b0ch
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  units:
    name: units
    annotations:
      order:
        tag: order
        value: 8
    description: One of (none|mi|km|kft|m|ft|in|cm) for the length units. Default
      is none (use Line object's units).
    comments:
    - 'Import: mapped; the length unit of every per-length header via LENGTH_UNIT.
      Export: m (B1).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Line
    - Linecode
    - Linegeometry
    - Linespacing
    range: string
    required: false
  rmatrix:
    name: rmatrix
    annotations:
      order:
        tag: order
        value: 9
      dss_format:
        tag: dss_format
        value: matrix
    description: Resistance matrix, lower triangle, ohms per unit length.
    comments:
    - 'Import: structural; PhaseImpedanceData r, one row per lower-triangle element.
      Export: phase code: r, lower triangle (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PhaseImpedanceData.r
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
    multivalued: true
  xmatrix:
    name: xmatrix
    annotations:
      order:
        tag: order
        value: 10
      dss_format:
        tag: dss_format
        value: matrix
    description: Reactance matrix, lower triangle, ohms per unit length.
    comments:
    - 'Import: structural; PhaseImpedanceData x, one row per lower-triangle element.
      Export: phase code: x, lower triangle (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PhaseImpedanceData.x
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
    multivalued: true
  cmatrix:
    name: cmatrix
    annotations:
      order:
        tag: order
        value: 11
      dss_format:
        tag: dss_format
        value: matrix
    description: Nodal Capacitance matrix, lower triangle, nf per unit length.
    comments:
    - 'Import: derived; PhaseImpedanceData b = 2 pi baseFreq C (b_from_c): nF -> nS.
      Export: rule, phase code: c_from_b(b), lower triangle (nF/m); unset -> zeros.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PhaseImpedanceData.b
    domain_of:
    - Capacitor
    - Line
    - Linecode
    range: float
    required: false
    multivalued: true
  baseFreq:
    name: baseFreq
    annotations:
      order:
        tag: order
        value: 12
    description: Frequency at which impedances are specified. Default is 60 Hz.
    comments:
    - 'Import: copied to PerLengthPhaseImpedance.calculatedFrequency (Hz), PerLengthSequenceImpedance.calculatedFrequency
      (Hz); also the frequency of the derived b. Export: network.base_frequency (Hz);
      a calculatedFrequency that differs raises.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthImpedance.calculatedFrequency
    rank: 1000
    domain_of:
    - Linecode
    range: float
    required: false
  normamps:
    name: normamps
    annotations:
      order:
        tag: order
        value: 13
    description: Normal ampere limit on line.
    todos:
    - Per-length-impedance-level current limits not yet mapped. Should create a WireInfo.ratedCurrent
      or OperationalLimitSet if this is needed.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, no rating on a PerLengthImpedance;
      the Line carries its own.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Fault
    range: float
    required: false
  emergamps:
    name: emergamps
    annotations:
      order:
        tag: order
        value: 14
    description: Emergency ampere limit on line (usually one-hour rating).
    todos:
    - Emergency rating not yet mapped; same path as normamps.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, no rating on a PerLengthImpedance;
      the Line carries its own.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Fault
    range: float
    required: false
  faultrate:
    name: faultrate
    annotations:
      order:
        tag: order
        value: 15
    description: Number of faults per unit length per year.
    todos:
    - Requires CIM extension to roundtrip.
    comments:
    - 'Import: untranscribed; reliability data; no home in the network profile parts.
      Export: not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Linecode
    - Fault
    range: float
    required: false
  pctperm:
    name: pctperm
    annotations:
      order:
        tag: order
        value: 16
    description: Percentage of the faults that become permanent.
    todos:
    - Requires CIM extension to roundtrip.
    comments:
    - 'Import: untranscribed; reliability data; no home in the network profile parts.
      Export: not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Reactor
    - Linecode
    - Fault
    range: float
    required: false
  repair:
    name: repair
    annotations:
      order:
        tag: order
        value: 17
    description: Hours to repair.
    todos:
    - Requires CIM extension to roundtrip.
    comments:
    - 'Import: untranscribed; reliability data; no home in the network profile parts.
      Export: not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Linecode
    - Fault
    range: float
    required: false
  Kron:
    name: Kron
    annotations:
      order:
        tag: order
        value: 18
    description: Kron = Y/N. If Yes, performs Kron reduction after impedance matrix
      is computed.
    comments:
    - 'Import: untranscribed; input of the matrix calculation; no CIM home. Export:
      not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    rank: 1000
    domain_of:
    - Linecode
    range: boolean
    required: false
  Rg:
    name: Rg
    annotations:
      order:
        tag: order
        value: 19
    description: Carson earth return resistance per unit length used to compute impedance
      values at base frequency.
    comments:
    - 'Import: untranscribed; Carson earth return per length. Export: not written,
      PerLengthImpedance.rg set raises (not imported either).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthImpedance.rg
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  Xg:
    name: Xg
    annotations:
      order:
        tag: order
        value: 20
    description: Carson earth return reactance per unit length used to compute impedance
      values at base frequency.
    comments:
    - 'Import: untranscribed; Carson earth return per length. Export: not written,
      PerLengthImpedance.xg set raises (not imported either).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthImpedance.xg
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  rho:
    name: rho
    annotations:
      order:
        tag: order
        value: 21
    description: Default=100 meter ohms. Earth resistivity.
    comments:
    - 'Import: untranscribed; earth resistivity; home EarthResistivity.rho, an object
      of its own, not mapped until a deck sets it. Export: not written, not in CIM
      (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:EarthResistivity.rho
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  neutral:
    name: neutral
    annotations:
      order:
        tag: order
        value: 22
    description: Designates which conductor is the neutral conductor that will be
      eliminated by Kron reduction.
    comments:
    - 'Import: untranscribed; input of the matrix calculation; no CIM home. Export:
      not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    rank: 1000
    domain_of:
    - Linecode
    range: integer
    required: false
  B1:
    name: B1
    annotations:
      order:
        tag: order
        value: 23
    description: Alternate way to specify C1. MicroS per unit length.
    todos:
    - B1 input path not yet implemented. B1 (µS/unit) → bch via bch = B1 × 1e-6 /
      length_factor.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.bch (uS/<units>); the alternative
      to C1. Export: not written, C1 carries the susceptance.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.bch
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  B0:
    name: B0
    annotations:
      order:
        tag: order
        value: 24
    description: Alternate way to specify C0. MicroS per unit length.
    todos:
    - B0 input path not yet implemented.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.b0ch (uS/<units>); the alternative
      to C0. Export: not written, C0 carries the susceptance.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.b0ch
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  Seasons:
    name: Seasons
    annotations:
      order:
        tag: order
        value: 25
    description: Defines the number of ratings to be defined for the wire, to be used
      only when defining seasonal ratings using the Ratings property.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, not in CIM (untranscribed
      on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Line
    - Transformer
    - Storagecontroller
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Xfmrcode
    range: integer
    required: false
  Ratings:
    name: Ratings
    annotations:
      order:
        tag: order
        value: 26
    description: An array of ratings to be used when the seasonal ratings flag is
      True.
    todos:
    - Seasonal ratings converter not yet implemented for LineCode.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, not in CIM (untranscribed
      on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Line
    - Transformer
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Xfmrcode
    range: float
    required: false
    multivalued: true
  LineType:
    name: LineType
    annotations:
      order:
        tag: order
        value: 27
    description: Code designating the type of line.
    todos:
    - LineType → PSRType mapping not yet implemented for LineCode.
    comments:
    - 'Import: untranscribed; no home in the network profile parts. Export: not written,
      not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Line
    - Linecode
    - Linegeometry
    range: string
    required: false
  like:
    name: like
    annotations:
      order:
        tag: order
        value: 28
    description: 'Make like another object, e.g.: New LineCode.L2 like=L1 ...'
    comments:
    - 'Import: untranscribed; the reader resolves like= before mapping. Export: not
      written, the writer never writes like=.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    domain_of:
    - Load
    - Generator
    - Generic5
    - Gicline
    - Indmach012
    - Pvsystem
    - Storage
    - Upfc
    - Vccs
    - Vsconverter
    - Windgen
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Capcontrol
    - Espvlcontrol
    - Expcontrol
    - Fuse
    - Gendispatcher
    - Invcontrol
    - Pycontrol
    - Recloser
    - Regcontrol
    - Relay
    - Storagecontroller
    - Swtcontrol
    - Upfccontrol
    - Cndata
    - Dynamicexp
    - Growthshape
    - Linecode
    - Linegeometry
    - Linespacing
    - Loadshape
    - Priceshape
    - Spectrum
    - TccCurve
    - Tsdata
    - Tshape
    - Wiredata
    - Xfmrcode
    - Xycurve
    - Energymeter
    - Fmonitor
    - Monitor
    - Sensor
    - Fault
    - Gicsource
    - Isource
    - Vsource
    range: string
    required: false
class_uri: dss:Linecode

Induced

name: Linecode
description: A Linecode object in OpenDSS defining per-unit-length impedance data
  shared by multiple lines. Depending on whether sequence impedances or matrices are
  provided, the converter creates either a PerLengthSequenceImpedance or a PerLengthPhaseImpedance
  + PhaseImpedanceData.
comments:
- 'Import: a LineCode becomes a template PerLengthSequenceImpedance (r1/x1/r0/x0 with
  C1, C0 or B1, B0), or a PerLengthPhaseImpedance with PhaseImpedanceData rows (rmatrix/xmatrix/cmatrix),
  plus its WireConfiguration lc_<name>_wc (isTemplate=true), in linecode.cimtbl. Values
  are copied per length in the code''s units.'
- 'Export: every template PerLengthImpedance is written as a LineCode per metre, C
  from b at the network''s base frequency (exporter/linecode.py).'
from_schema: https://gridappsd.github.io/dss-graph/opendss
close_mappings:
- cim:PerLengthSequenceImpedance
- cim:PerLengthPhaseImpedance
related_mappings:
- cim:WireConfiguration
attributes:
  name:
    name: name
    description: Object name. Must be unique per object type.
    comments:
    - 'Import: copied to PerLengthPhaseImpedance.name, PerLengthSequenceImpedance.name,
      WireConfiguration.name; mRID = lc_ + name, lowercased. Export: Names.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:IdentifiedObject.name
    identifier: true
    owner: Linecode
    domain_of:
    - Load
    - Generator
    - Generic5
    - Gicline
    - Indmach012
    - Pvsystem
    - Storage
    - Upfc
    - Vccs
    - Vsconverter
    - Windgen
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Capcontrol
    - Espvlcontrol
    - Expcontrol
    - Fuse
    - Gendispatcher
    - Invcontrol
    - Pycontrol
    - Recloser
    - Regcontrol
    - Relay
    - Storagecontroller
    - Swtcontrol
    - Upfccontrol
    - Buscoords
    - Cndata
    - Dynamicexp
    - Growthshape
    - Linecode
    - Linegeometry
    - Linespacing
    - Loadshape
    - Priceshape
    - Spectrum
    - TccCurve
    - Tsdata
    - Tshape
    - Wiredata
    - Xfmrcode
    - Xycurve
    - Energymeter
    - Fmonitor
    - Monitor
    - Sensor
    - Fault
    - Gicsource
    - Isource
    - Options
    - Vsource
    range: string
    required: true
  nphases:
    name: nphases
    annotations:
      order:
        tag: order
        value: 1
      dss_default:
        tag: dss_default
        value: int(3)
    description: Number of phases in the line this line code data represents. Default
      is 3.
    comments:
    - 'Import: copied to PerLengthPhaseImpedance.conductorCount (the matrix order);
      a 1- or 2-phase sequence code becomes a phase matrix as the engine builds the
      line. Export: phase code: conductorCount; sequence code: 3.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthPhaseImpedance.conductorCount
    rank: 1000
    owner: Linecode
    domain_of:
    - Linecode
    - Linegeometry
    - Linespacing
    range: integer
    required: false
    minimum_value: 1
    maximum_value: 3
  r1:
    name: r1
    annotations:
      order:
        tag: order
        value: 2
      dss_default:
        tag: dss_default
        value: float(0.058)
    description: Positive-sequence Resistance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.r (ohm/<units>). Export: sequence
      code: r (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.r
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  x1:
    name: x1
    annotations:
      order:
        tag: order
        value: 3
      dss_default:
        tag: dss_default
        value: float(0.1206)
    description: Positive-sequence Reactance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.x (ohm/<units>). Export: sequence
      code: x (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.x
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  r0:
    name: r0
    annotations:
      order:
        tag: order
        value: 4
      dss_default:
        tag: dss_default
        value: float(0.1784)
    description: Zero-sequence Resistance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.r0 (ohm/<units>). Export: sequence
      code: r0 (ohm/m); unset raises.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.r0
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  x0:
    name: x0
    annotations:
      order:
        tag: order
        value: 5
      dss_default:
        tag: dss_default
        value: float(0.4047)
    description: Zero-sequence Reactance, ohms per unit length.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.x0 (ohm/<units>). Export: sequence
      code: x0 (ohm/m); unset raises.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.x0
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  C1:
    name: C1
    annotations:
      order:
        tag: order
        value: 6
      dss_default:
        tag: dss_default
        value: float(3.4)
    description: Positive-sequence capacitance, nf per unit length.
    comments:
    - 'Import: derived; PerLengthSequenceImpedance bch = 2 pi baseFreq C1 (b_from_c):
      nF -> nS. Export: rule, sequence code: c_from_b(bch) (nF/m); unset -> 0.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthSequenceImpedance.bch
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  C0:
    name: C0
    annotations:
      order:
        tag: order
        value: 7
      dss_default:
        tag: dss_default
        value: float(1.6)
    description: Zero-sequence capacitance, nf per unit length.
    comments:
    - 'Import: derived; PerLengthSequenceImpedance b0ch = 2 pi baseFreq C0 (b_from_c):
      nF -> nS. Export: rule, sequence code: c_from_b(b0ch) (nF/m); unset -> 0.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthSequenceImpedance.b0ch
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  units:
    name: units
    annotations:
      order:
        tag: order
        value: 8
    description: One of (none|mi|km|kft|m|ft|in|cm) for the length units. Default
      is none (use Line object's units).
    comments:
    - 'Import: mapped; the length unit of every per-length header via LENGTH_UNIT.
      Export: m (B1).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    - Linegeometry
    - Linespacing
    range: string
    required: false
  rmatrix:
    name: rmatrix
    annotations:
      order:
        tag: order
        value: 9
      dss_format:
        tag: dss_format
        value: matrix
    description: Resistance matrix, lower triangle, ohms per unit length.
    comments:
    - 'Import: structural; PhaseImpedanceData r, one row per lower-triangle element.
      Export: phase code: r, lower triangle (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PhaseImpedanceData.r
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
    multivalued: true
  xmatrix:
    name: xmatrix
    annotations:
      order:
        tag: order
        value: 10
      dss_format:
        tag: dss_format
        value: matrix
    description: Reactance matrix, lower triangle, ohms per unit length.
    comments:
    - 'Import: structural; PhaseImpedanceData x, one row per lower-triangle element.
      Export: phase code: x, lower triangle (ohm/m).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PhaseImpedanceData.x
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
    multivalued: true
  cmatrix:
    name: cmatrix
    annotations:
      order:
        tag: order
        value: 11
      dss_format:
        tag: dss_format
        value: matrix
    description: Nodal Capacitance matrix, lower triangle, nf per unit length.
    comments:
    - 'Import: derived; PhaseImpedanceData b = 2 pi baseFreq C (b_from_c): nF -> nS.
      Export: rule, phase code: c_from_b(b), lower triangle (nF/m); unset -> zeros.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PhaseImpedanceData.b
    owner: Linecode
    domain_of:
    - Capacitor
    - Line
    - Linecode
    range: float
    required: false
    multivalued: true
  baseFreq:
    name: baseFreq
    annotations:
      order:
        tag: order
        value: 12
    description: Frequency at which impedances are specified. Default is 60 Hz.
    comments:
    - 'Import: copied to PerLengthPhaseImpedance.calculatedFrequency (Hz), PerLengthSequenceImpedance.calculatedFrequency
      (Hz); also the frequency of the derived b. Export: network.base_frequency (Hz);
      a calculatedFrequency that differs raises.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthImpedance.calculatedFrequency
    rank: 1000
    owner: Linecode
    domain_of:
    - Linecode
    range: float
    required: false
  normamps:
    name: normamps
    annotations:
      order:
        tag: order
        value: 13
    description: Normal ampere limit on line.
    todos:
    - Per-length-impedance-level current limits not yet mapped. Should create a WireInfo.ratedCurrent
      or OperationalLimitSet if this is needed.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, no rating on a PerLengthImpedance;
      the Line carries its own.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Fault
    range: float
    required: false
  emergamps:
    name: emergamps
    annotations:
      order:
        tag: order
        value: 14
    description: Emergency ampere limit on line (usually one-hour rating).
    todos:
    - Emergency rating not yet mapped; same path as normamps.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, no rating on a PerLengthImpedance;
      the Line carries its own.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Fault
    range: float
    required: false
  faultrate:
    name: faultrate
    annotations:
      order:
        tag: order
        value: 15
    description: Number of faults per unit length per year.
    todos:
    - Requires CIM extension to roundtrip.
    comments:
    - 'Import: untranscribed; reliability data; no home in the network profile parts.
      Export: not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Linecode
    - Fault
    range: float
    required: false
  pctperm:
    name: pctperm
    annotations:
      order:
        tag: order
        value: 16
    description: Percentage of the faults that become permanent.
    todos:
    - Requires CIM extension to roundtrip.
    comments:
    - 'Import: untranscribed; reliability data; no home in the network profile parts.
      Export: not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Reactor
    - Linecode
    - Fault
    range: float
    required: false
  repair:
    name: repair
    annotations:
      order:
        tag: order
        value: 17
    description: Hours to repair.
    todos:
    - Requires CIM extension to roundtrip.
    comments:
    - 'Import: untranscribed; reliability data; no home in the network profile parts.
      Export: not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Linecode
    - Fault
    range: float
    required: false
  Kron:
    name: Kron
    annotations:
      order:
        tag: order
        value: 18
    description: Kron = Y/N. If Yes, performs Kron reduction after impedance matrix
      is computed.
    comments:
    - 'Import: untranscribed; input of the matrix calculation; no CIM home. Export:
      not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    rank: 1000
    owner: Linecode
    domain_of:
    - Linecode
    range: boolean
    required: false
  Rg:
    name: Rg
    annotations:
      order:
        tag: order
        value: 19
    description: Carson earth return resistance per unit length used to compute impedance
      values at base frequency.
    comments:
    - 'Import: untranscribed; Carson earth return per length. Export: not written,
      PerLengthImpedance.rg set raises (not imported either).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthImpedance.rg
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  Xg:
    name: Xg
    annotations:
      order:
        tag: order
        value: 20
    description: Carson earth return reactance per unit length used to compute impedance
      values at base frequency.
    comments:
    - 'Import: untranscribed; Carson earth return per length. Export: not written,
      PerLengthImpedance.xg set raises (not imported either).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:PerLengthImpedance.xg
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  rho:
    name: rho
    annotations:
      order:
        tag: order
        value: 21
    description: Default=100 meter ohms. Earth resistivity.
    comments:
    - 'Import: untranscribed; earth resistivity; home EarthResistivity.rho, an object
      of its own, not mapped until a deck sets it. Export: not written, not in CIM
      (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    close_mappings:
    - cim:EarthResistivity.rho
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  neutral:
    name: neutral
    annotations:
      order:
        tag: order
        value: 22
    description: Designates which conductor is the neutral conductor that will be
      eliminated by Kron reduction.
    comments:
    - 'Import: untranscribed; input of the matrix calculation; no CIM home. Export:
      not written, not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    rank: 1000
    owner: Linecode
    domain_of:
    - Linecode
    range: integer
    required: false
  B1:
    name: B1
    annotations:
      order:
        tag: order
        value: 23
    description: Alternate way to specify C1. MicroS per unit length.
    todos:
    - B1 input path not yet implemented. B1 (µS/unit) → bch via bch = B1 × 1e-6 /
      length_factor.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.bch (uS/<units>); the alternative
      to C1. Export: not written, C1 carries the susceptance.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.bch
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  B0:
    name: B0
    annotations:
      order:
        tag: order
        value: 24
    description: Alternate way to specify C0. MicroS per unit length.
    todos:
    - B0 input path not yet implemented.
    comments:
    - 'Import: copied to PerLengthSequenceImpedance.b0ch (uS/<units>); the alternative
      to C0. Export: not written, C0 carries the susceptance.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    exact_mappings:
    - cim:PerLengthSequenceImpedance.b0ch
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    range: float
    required: false
  Seasons:
    name: Seasons
    annotations:
      order:
        tag: order
        value: 25
    description: Defines the number of ratings to be defined for the wire, to be used
      only when defining seasonal ratings using the Ratings property.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, not in CIM (untranscribed
      on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Line
    - Transformer
    - Storagecontroller
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Xfmrcode
    range: integer
    required: false
  Ratings:
    name: Ratings
    annotations:
      order:
        tag: order
        value: 26
    description: An array of ratings to be used when the seasonal ratings flag is
      True.
    todos:
    - Seasonal ratings converter not yet implemented for LineCode.
    comments:
    - 'Import: untranscribed; catalog ratings have no home on PerLengthImpedance;
      instance limits or untranscribed. Export: not written, not in CIM (untranscribed
      on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Line
    - Transformer
    - Cndata
    - Linecode
    - Linegeometry
    - Tsdata
    - Wiredata
    - Xfmrcode
    range: float
    required: false
    multivalued: true
  LineType:
    name: LineType
    annotations:
      order:
        tag: order
        value: 27
    description: Code designating the type of line.
    todos:
    - LineType → PSRType mapping not yet implemented for LineCode.
    comments:
    - 'Import: untranscribed; no home in the network profile parts. Export: not written,
      not in CIM (untranscribed on import).'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Line
    - Linecode
    - Linegeometry
    range: string
    required: false
  like:
    name: like
    annotations:
      order:
        tag: order
        value: 28
    description: 'Make like another object, e.g.: New LineCode.L2 like=L1 ...'
    comments:
    - 'Import: untranscribed; the reader resolves like= before mapping. Export: not
      written, the writer never writes like=.'
    from_schema: https://gridappsd.github.io/dss-graph/general/linecode
    owner: Linecode
    domain_of:
    - Load
    - Generator
    - Generic5
    - Gicline
    - Indmach012
    - Pvsystem
    - Storage
    - Upfc
    - Vccs
    - Vsconverter
    - Windgen
    - Autotrans
    - Capacitor
    - Gictransformer
    - Line
    - Reactor
    - Transformer
    - Capcontrol
    - Espvlcontrol
    - Expcontrol
    - Fuse
    - Gendispatcher
    - Invcontrol
    - Pycontrol
    - Recloser
    - Regcontrol
    - Relay
    - Storagecontroller
    - Swtcontrol
    - Upfccontrol
    - Cndata
    - Dynamicexp
    - Growthshape
    - Linecode
    - Linegeometry
    - Linespacing
    - Loadshape
    - Priceshape
    - Spectrum
    - TccCurve
    - Tsdata
    - Tshape
    - Wiredata
    - Xfmrcode
    - Xycurve
    - Energymeter
    - Fmonitor
    - Monitor
    - Sensor
    - Fault
    - Gicsource
    - Isource
    - Vsource
    range: string
    required: false
class_uri: dss:Linecode