Model Data

Input Data Load

POMATWO.load_dataMethod
load_data(data::Dict)

Reads a collection of model input files specified by a dictionary and returns a fully populated Parameters struct for use in the market simulation.

Arguments

  • data::Dict{Symbol, String}: A dictionary mapping required and optional parameter names to file paths.

Required keys

The following keys must be included in data:

  • :plants - Plant specification file.
  • :nodes - Node topology file.
  • :zones - Zone definition file.
  • :demand - Nodal or zonal demand input.
  • :types - Technology or plant type definitions.

Optional keys

These keys can optionally be included to enable extended model functionality:

  • Network:
    • :lines - AC transmission line definitions.
    • :dclines - DC line definitions (requires :lines to be included).
  • Availability and plant characteristics:
    • :avail - Plant availability.
    • :avail_planttype_nodal - Availability by plant type and node.
    • :avail_planttype_zonal - Availability by plant type and zone.
    • :min_generation - Minimum generation constraints.
  • Market and operation:
    • :ntc - Net Transfer Capacities between zones.
    • :fixed_exchange - Fixed exchange schedules.
    • :prs_demand - Prosumer demand profiles.
    • :fuel_prices - Time-dependent fuel prices.
    • :inflow - Storage inflow data (e.g. hydro).
    • :historical_generation - Historical generation for calibration.
Note

Some advanced model features (e.g. redispatch or zonal availability mapping) depend on optional keys. Omitting them may disable those capabilities.

Example

data = Dict(
    :plants => joinpath(datapath, "plants.csv"),
    :nodes => joinpath(datapath, "nodes.csv"),
    :zones => joinpath(datapath, "zones.csv"),
    :lines => joinpath(datapath, "lines.csv"),
    :dclines => joinpath(datapath, "dclines.csv"),
    :demand => joinpath(datapath, "nodal_load.csv"),
    :types => joinpath(datapath, "planttypes.csv"),
)

params = load_data(data)
source

Model Input Data Structure

The data that is read in using the load_data function has to be provided via seperate csv files. In the following section, the structure of those files is described. Generally the column headers have to be identical to what is described as Column in the tables below. Table rows are created to add a data entry and should follow thy type convention also specified below.

File Structure :plants

Describes information about power plants and their attributes. Each row represents a different plant with the following columns:

ColumnTypeDescription
indexStringUnique identifier for the plant.
plant_typeStringType of power plant (e.g., wind, coal, etc.).
nodeStringIdentifier for the network node to which the plant is connected.
g_maxIntegerMaximum generation capacity of the plant (in MW).
etaIntegerEfficiency factor or binary flag for participation (typically 0 or 1).
storage_capacityIntegerMaximum storage capacity (in MWh), 0 if not applicable.
latFloatLatitude of the plant's location.
lonFloatLongitude of the plant's location.
storage_powerFloatPower limit of the storage system (in MW), may be NaN if not applicable.

Example

| index | plant_type | node | g_max | eta | storage_capacity | lat       | lon        | storage_power |
|-------|------------|------|-------|-----|------------------|-----------|------------|----------------|
| p1    | wind       | n1   | 140   | 1   | 0                | 49.978037 | 9.066645   |                |
| p2    | coal       | n2   | 300   | 1   | 0                | 51.489714 | 10.413338  |                |
Note

Plants without storage systems have storage_capacity = 0 and storage_power = NaN.

The eta column may represent conversion efficiency or a binary indicator, depending on the modeling context.


File Structure :types

Planttypes are described as follows:

ColumnTypeDescription
indexStringName of the plant type (e.g., coal, wind).
dispatchableIntegerIndicates if the plant type is dispatchable (1) or not (0).
storageIntegerIndicates if the plant type has storage capability (1) or not (0).
fuel_priceIntegerFuel cost (arbitrary units or €/MWh).
co2contentIntegerCO₂ emissions per unit of energy.
prosumerIntegerIndicates if the plant type supports prosumer behavior (1) or not (0).
colorStringHex color code used for visualization.

Example

| index    | dispatchable | storage | fuel_price |
|----------|--------------|---------|------------|
| coal     | 1            | 0       | 25         |
| wind     | 1            | 0       | 7          |

File Structure :avail, :avail_planttype_nodal, :avail_planttype_zonal

Availabilities for each time step can be defined. If no availabilities are defined the default of 1.0is assumed. The values are used to scale the maximum generation or operational capacity of a plant or unit for each time step.

ColumnTypeDescription
prs_n1Float64Availability factor (between 0.0 and 1.0) for the prosumer unit at node n1. This represents the fraction of maximum capacity that is available at each time step.

Example :avail

| prs_n1 |
|--------|
| 0.1    |
| 0.8    |
| 0.7    |
| 0      |
Note

Each row corresponds to a different time step.

The column name (prs_n1) corresponds to a prosumer identifier and may vary or be part of a larger dataset with multiple columns (e.g., prs_n1, prs_n2, etc.).

A value of 1.0 means full availability; 0.0 means the unit is unavailable at that time.


File Structure :demand

Contains the time series of load demand at each node.

ColumnTypeDescription
n1IntegerLoad demand in MW at node n1 for each time step. (Example shown; actual structure may include multiple nodes.)
n2IntegerLoad demand in MW at node n2 for each time step. (Example shown; actual structure may include multiple nodes.)
...IntegerLoad demand in MW at node nx for each time step. (Example shown; actual structure may include multiple nodes.)

Example

| n1  |
|-----|
| 60  |
| 100 |
| 120 |
| 180 |

File Structure :zones

Specifies the geographic or administrative zones involved in the model.

ColumnTypeDescription
indexStringIdentifier for the zone (e.g., DE).

Example

| index  |
|--------|
| DE     |

File Structure :nodes

Defines all nodes in the network along with their geographic and zone information.

ColumnTypeDescription
indexStringNode identifier.
zoneStringZone the node belongs to.
nameStringHuman-readable node name.
latFloatLatitude coordinate.
lonFloatLongitude coordinate.
slackIntegerIndicator for slack bus (1 if slack, otherwise 0).

Example

| index  | zone | name                 | lat        | lon        | slack |
|--------|------|----------------------|------------|------------|-------|
| n1     | DE   | MUHLBACH             | 47.907355  | 7.555917   | 1     |
| n2     | DE   | Y-Otterbach          | 49.487800  | 7.722690   | 0     |
| n3     | DE   | Salzburg Elixhausen  | 47.868229  | 13.076006  | 0     |

File Structure :lines

Describes the properties of AC transmission lines between nodes.

ColumnTypeDescription
NE_nameStringLine name.
node_iStringFrom-node ID.
node_jStringTo-node ID.
voltageIntegerNominal voltage level (kV).
rFloatLine resistance (Ohms).
xFloatLine reactance (Ohms).
bIntegerLine susceptance (unitless).
I_nomIntegerNominal current rating.
capacityIntegerTransmission capacity (MW).
indexStringLine identifier (typically same as NE_name).
lat_iFloatLatitude of from-node.
lon_iFloatLongitude of from-node.
lat_jFloatLatitude of to-node.
lon_jFloatLongitude of to-node.
node_i_nameStringName of from-node.
node_j_nameStringName of to-node.

Example

| NE_name | node_i | node_j | voltage |   r    |    x    | b | I_nom | capacity | index |   lat_i   |   lon_i   |   lat_j   |   lon_j   | node_i_name | node_j_name |
|---------|--------|--------|---------|--------|---------|---|--------|----------|--------|-----------|-----------|-----------|-----------|--------------|--------------|
| l1      | n1     | n2     | 220     | 4.0937 | 18.349  | 1 | 790    | 30       | l1     | 47.907355 | 7.555917  | 49.487800 | 7.722690  | Eula         | Roehrsdorf   |
| l2      | n2     | n3     | 220     | 7.5895 | 31.888  | 1 | 790    | 100      | l2     | 49.487800 | 7.722690  | 47.868229 | 13.076006 | Roehrsdorf   | Weida        |
| l3      | n1     | n3     | 220     | 7.5895 | 31.888  | 1 | 790    | 100      | l3     | 47.907355 | 7.555917  | 547.868229| 13.076006 | Weida        | Eula         |

File Structure :dclines

Describes the properties of DC transmission lines between nodes.

ColumnTypeDescription
indexStringLine identifier.
node_iStringFrom-node ID.
node_jStringTo-node ID.
lat_iStringLatitude of from-node.
lon_iStringLongitude of from-node.
lat_jStringLatitude of to-node.
lon_jStringLongitude of to-node.
capacityStringCapacity of the DC line.

Example

| index   | node_i | node_j | lat_i | lon_i   | lat_j  | lon_j  | capacity |
|---------|--------|--------|--------|--------|--------|--------|----------|

Prosumers: File Structure :prs_demand

Contains the time series demand for prosumer nodes.

ColumnTypeDescription
prs_n1IntegerElectricity demand (in MW) for the prosumer at node n1 for each time step. (Additional prosumer columns may be present in the full dataset.)

Example

| prs_n1 |
|--------|
| 20     |
| 10     |
| 30     |
| 0      |

Prosumers: File Structure generation

Prosumer generators are described analogously to plants File Structure :plants.

Parameters

Based on the given input data, a Parameters struct is created.

POMATWO.ParametersType
Parameters

Container structure for all static and time-varying input data used in a power system model.

This struct encapsulates metadata, technical parameters, profiles, and mappings for generation units, nodes, transmission infrastructure, demand, and other components relevant to electricity system modeling. It is typically used as a central configuration object passed to optimization or simulation routines.

Fields

Sets

  • sets::Sets: Collection of index sets (e.g., nodes, plants, zones) used across the model.

Power plant parameters

  • gmax::Dict{String,Float64}: Maximum generation capacity per plant.
  • eta::Dict{String,Float64}: Efficiency of each plant.
  • gmax_storage::Dict{String,Float64}: Maximum generation capacity from storage units.
  • storage::Dict{String,Float64}: Energy storage capacity.
  • mc::Dict{String,Profile}: Marginal costs as time series profiles per plant.
  • avail::Dict{String,Profile}: Availability factor per plant over time.
  • avail_planttype_nodal::Dict{Tuple{String,String},Profile}: Time-dependent availability by (node, plant type).
  • avail_planttype_zonal::Dict{Tuple{String,String},Profile}: Time-dependent availability by (zone, plant type).
  • plant_type::Dict{String,String}: Mapping from plant name to plant type.

Plant type metadata

  • plant_type2color::Dict{String,String}: Color coding for each plant type (for plotting).
  • dispatchable::Vector{String}: List of dispatchable plant types.
  • nondispatchable::Vector{String}: List of non-dispatchable plant types.
  • storage_types::Vector{String}: List of storage technologies.
  • fuel_price::Dict{String,Profile}: Time-varying fuel price per plant type.
  • co2content::Dict{String,Float64}: CO₂ emissions per MWh of each plant type.
  • historical_generation::Dict{String,Profile}: Historical generation profiles.
  • min_generation::Dict{String,Profile}: Minimum generation profiles.

Node parameters

  • slack::Vector{String}: Names of slack buses (reference nodes).
  • node2zone::Dict{String,String}: Mapping from node to zone.
  • node_coords::Dict{String,Vector{Float64}}: Coordinates of nodes (e.g., for plotting or distance-based calculations).

AC line parameters

  • acline_capacity::Dict{String,Float64}: Thermal capacity of each AC line.

  • resistance::Dict{String,Float64}: Resistance per AC line.

  • reactance::Dict{String,Float64}: Reactance per AC line.

  • bvector::Dict{String,Float64}: Susceptance of each AC line.

  • circuits::Dict{String,Int64}: Number of circuits per line.

  • voltage::Dict{String,Float64}: Voltage level of each line.

  • line_start::Dict{String,String}: Start node of each AC line.

  • line_end::Dict{String,String}: End node of each AC line.

  • b::Dict{Tuple{String,String},Float64}: Line susceptance between node pairs.

  • h::Dict{Tuple{String,String},Float64}: Network matrix entries used in power flow approximations.

  • ptdf::Dict{Tuple{String,String},Float64}: Power Transfer Distribution Factors between (line, node) pairs.

DC line parameters

  • dcline_capacity::Dict{String,Float64}: Transfer capacity of each DC line.
  • dc_start::Dict{String,String}: Start node of each DC line.
  • dc_end::Dict{String,String}: End node of each DC line.

Demand parameters

  • nodal_load::Dict{String,Profile}: Time series of nodal demand.
  • zonal_load::Dict{String,Profile}: Time series of zonal demand.
  • inflow::Dict{String,Profile}: Time-dependent inflows to storage (e.g., hydro).
  • fixed_exchange::Dict{String,Profile}: Fixed cross-border or interzonal exchanges (e.g., from contracts or historical data).

Zone parameters

  • ntc::Dict{Tuple{String,String},Float64}: Net transfer capacity between zones.

Prosumer parameters

  • prosumer_types::Vector{String}: List of prosumer types modeled.
  • prs_demand::Dict{String,Profile}: Time series of demand from prosumers.
  • nodal_load_no_prs::Dict{String,Profile}: Nodal demand excluding prosumer influence.

Mapping data

  • nodes_in_zone::Dict{String,Vector{String}}: List of nodes per zone.
  • plants_in_zone::Dict{String,Vector{String}}: Plants located in each zone.
  • storages_in_zone::Dict{String,Vector{String}}: Storage units in each zone.
  • plants_in_node::Dict{String,Vector{String}}: Plants located at each node.
  • storages_in_node::Dict{String,Vector{String}}: Storage units at each node.
  • plant2node::Dict{String,String}: Node location of each plant.
  • plant2zone::Dict{String,String}: Zone location of each plant.
  • importing_ntcs::Dict{String,Vector{String}}: NTCs importing into a given zone.
  • exporting_ntcs::Dict{String,Vector{String}}: NTCs exporting from a given zone.

Plotting parameters

  • colors::Dict{String,String}: Color mapping for zones, nodes, or technologies (used in visualization).
source