One-way Transmission Link

Contents

Overview | Asset Structure | Input File (Standard Format) | Types - Asset Structure | Constructors | Examples | Best Practices | Input File (Advanced Format)

One-way Transmission Link assets in Macro represent a unidirectional commodity transmission infrastructure that links a source node to a destination node. These assets are specified using JSON or CSV input files located in the assets directory, usually named with descriptive identifiers such as oneway_transmissions.json or oneway_transmissions.csv.

A One-way Transmission Link asset consists of one main component:

  1. Transmission Edge: Represents the unidirectional flow of a commodity from a start node to an end node with capacity constraints and losses

Here is a simple graphical representation of the One-way Transmission Link asset:

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#D1EBDE' }}}%% flowchart LR subgraph OneWayTransmissionLink direction LR A((Commodity)) e1@-->|OneWayTransmission| B((Commodity)) e1@{ animate: true } end style A r:40,fill:#FFD700,stroke:black,color:black,stroke-dasharray: 3,5; style B r:40,fill:#FFD700,stroke:black,color:black,stroke-dasharray: 3,5; linkStyle 0 stroke:#FFD700, stroke-width: 2px;

The easiest way to include a One-way Transmission Link asset in a model is to create a new file (either JSON or CSV) and place it in the assets directory together with the other assets.

your_case/
├── assets/
│   ├── oneway_transmissions.json    # or oneway_transmissions.csv
│   ├── other_assets.json
│   └── ...
├── system/
├── settings/
└── ...

This file can either be created manually, or using the template_asset function. The file will be automatically loaded when you run your Macro model.

The following is an example of a One-way Transmission Link asset input file:

{
    "link": [
        {
            "type": "OneWayTransmissionLink",
            "instance_data": [
                {
                    "id": "SE_to_MIDAT_oneway",
                    "commodity": "Electricity",
                    "transmission_origin": "elec_SE",
                    "transmission_dest": "elec_MIDAT",
                    "distance": 491.4512001,
                    "existing_capacity": 5552,
                    "max_capacity": 27760,
                    "investment_cost": 40219,
                    "loss_fraction": 0.04914512,
                    "transmission_constraints": {
                        "MaxCapacityConstraint": true
                    }
                }
            ]
        }
    ]
}
Global Data vs Instance Data

When working with JSON input files, the global_data field can be used to group data that is common to all instances of the same asset type. This is useful for setting constraints that are common to all instances of the same asset type and avoid repeating the same data for each instance.

Essential Attributes

FieldTypeDescription
typeStringAsset type identifier: "OneWayTransmissionLink"
idStringUnique identifier for the One-way Transmission Link instance
commodityStringCommodity type being transmitted (e.g., "Electricity")
transmission_originStringOrigin node identifier
transmission_destStringDestination node identifier

One-way Transmission Link assets can have different constraints applied to them, and the user can configure them using the following fields:

FieldTypeDescription
transmission_constraintsDict{String,Bool}List of constraints applied to the transmission edge.

Users can refer to the Adding Asset Constraints to a System section of the User Guide for a list of all the constraints that can be applied to a transmission edge.

Default constraints

To simplify the input file and the asset configuration, the following constraints are applied to the One-way Transmission Link asset by default:

Investment Parameters

FieldTypeDescriptionUnitsDefault
can_retireBooleanWhether capacity can be retired-false
can_expandBooleanWhether capacity can be expanded-true
existing_capacityFloat64Initial installed capacityMW0.0
capacity_sizeFloat64Unit size for capacity decisions-1.0

Additional Investment Parameters

Maximum and minimum capacity constraints

If MaxCapacityConstraint or MinCapacityConstraint are added to the constraints dictionary for the transmission edge, the following parameters are used by Macro:

FieldTypeDescriptionUnitsDefault
max_capacityFloat64Maximum allowed capacityMWInf
min_capacityFloat64Minimum allowed capacityMW0.0

Economic Parameters

FieldTypeDescriptionUnitsDefault
investment_costFloat64CAPEX per unit capacity/MW0.0
annualized_investment_costUnion{Nothing,Float64}Annualized CAPEX/MW/yrcalculated
fixed_om_costFloat64Fixed O&M costs/MW/yr0.0
variable_om_costFloat64Variable O&M costs/MWh0.0
waccFloat64Weighted average cost of capitalfraction0.0
lifetimeIntAsset lifetime in yearsyears1
capital_recovery_periodIntInvestment recovery periodyears1
retirement_periodIntRetirement periodyears0

Operational Parameters

FieldTypeDescriptionUnitsDefault
distanceFloat64Distance between nodeskm0.0
loss_fractionFloat64Fraction of power lost during transmissionfraction0.0
unidirectionalBooleanWhether the transmission is unidirectional-true

The OneWayTransmissionLink asset is defined as follows:

struct OneWayTransmissionLink{T} <: AbstractAsset
    id::AssetId
    transmission_edge::UnidirectionalEdge{<:T}
end

Default constructor

OneWayTransmissionLink(id::AssetId, transmission_edge::UnidirectionalEdge{<:T})

Factory constructor

make(asset_type::Type{OneWayTransmissionLink}, data::AbstractDict{Symbol,Any}, system::System)
FieldTypeDescription
asset_typeType{OneWayTransmissionLink}Macro type of the asset
dataAbstractDict{Symbol,Any}Dictionary containing the input data for the asset
systemSystemSystem to which the asset belongs

This section contains examples of how to use the One-way Transmission Link asset in a Macro model.

JSON Format:

{
    "link": [
        {
            "type": "OneWayTransmissionLink",
            "global_data": {
                "transmission_constraints": {
                    "MaxCapacityConstraint": true
                }
            },
            "instance_data": [
                {
                    "id": "SE_to_MIDAT_oneway",
                    "commodity": "Electricity",
                    "transmission_origin": "elec_SE",
                    "transmission_dest": "elec_MIDAT",
                    "distance": 491.4512001,
                    "existing_capacity": 5552,
                    "max_capacity": 27760,
                    "investment_cost": 40219,
                    "loss_fraction": 0.04914512
                }
            ]
        }
    ]
}

CSV Format:

Typeidcommoditytransmission_origintransmission_destdistanceexisting_capacitymax_capacityinvestment_costloss_fractiontransmission_constraints–MaxCapacityConstraint
OneWayTransmissionLinkSE_to_MIDAT_onewayElectricityelec_SEelec_MIDAT491.4512001555227760402190.04914512true
  • Prefer global_data for shared fields and constraints across instances.
  • Ensure loss_fraction reflects realistic transmission losses for the distance and technology used.
  • Use descriptive IDs that indicate origin and destination.
  • Validate capacity-related cost and technology parameters before large-scale runs.

The advanced format mirrors the asset's hierarchical structure. A One-way Transmission Link asset is composed of a single transmission edge, represented by a UnidirectionalEdge object. The input file is therefore organized as follows:

{
    "edges": {
        "transmission_edge": {
            // ... transmission_edge-specific attributes ...
        }
    }
}

Below is an example of an input file using the advanced format for a One-way Transmission Link asset.

{
    "link": [
        {
            "type": "OneWayTransmissionLink",
            "global_data": {
                "edges": {
                    "transmission_edge": {
                        "commodity": "Electricity",
                        "has_capacity": true,
                        "unidirectional": true,
                        "can_expand": true,
                        "can_retire": false,
                        "integer_decisions": false,
                        "constraints": {
                            "CapacityConstraint": true,
                            "MaxCapacityConstraint": true
                        }
                    }
                }
            },
            "instance_data": [
                {
                    "id": "SE_to_MIDAT_oneway",
                    "edges": {
                        "transmission_edge": {
                            "start_vertex": "elec_SE",
                            "end_vertex": "elec_MIDAT",
                            "distance": 491.4512001,
                            "existing_capacity": 5552,
                            "max_capacity": 27760,
                            "investment_cost": 40219,
                            "loss_fraction": 0.04914512
                        }
                    }
                }
            ]
        }
    ]
}

Key Points

  • The global_data field is utilized to define attributes and constraints that apply universally to all instances of a particular asset type.
  • The start_vertex and end_vertex fields indicate the nodes to which the transmission edge is connected. These nodes must be defined in the nodes.json file.
  • For a comprehensive list of attributes that can be configured for the edge component, refer to the edges page of the Macro manual.