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.
Optional Keys

Some model features (e.g. redispatch or zonal availability mapping) depend on optional keys. Omitting them may disable those capabilities. The functionallity of optional file inputs and keys is currently not included in automated testing.


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. It has to be provided via separate 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.

Index Linking

Input tables may reference each other via unique identifiers ('index'). It is crucial that these indices are consistent and unique across all files. For example, plant_type in File Structure :plants must match an index in :types File Structure :types, and node in File Structure :plants must match an index in File Structure :nodes.


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.
Index Linking

The plant_type column must match an index in File Structure :types. The node column must match an index in File Structure :nodes.


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.
Index Linking

The index column here is referenced by the plant_type column in File Structure :plants.


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.0 is assumed. The values are used to scale the maximum generation or operational capacity of a plant or unit for each time step. The model will automatically assign the provided availibility with the highest level of detail according to the following hierachy:

availibility typedescriptionhierarchy level
:availAvailability of a specific production unit1
:avail_planttype_nodalAvailability of a given plant_type at a specific node2
:avail_planttype_zonalAvailability of a given planttype at a specific zone3
defaultautomatically assigned default value if no availibility is provided via data input files (defaults to 1)4

:avail

Availability of a specific production unit, specified by the column name.

ColumnTypeDescription
p1Float64factor between 0.0 and 1.0
p2Float64factor between 0.0 and 1.0
...Float64factor between 0.0 and 1.0
Example
| p1     | p2     |
|--------|--------|
| 0.1    | 0.2    |
| 0.8    | 0.9    |
| 0.7    | 0.8    |
| 0      | 0      |
Index Linking

Each column name must reference a production unit via the index defined in the index column of File Structure :plants


:avail_planttype_nodal

Availability of a respective node, specified by the column name.

ColumnTypeDescription
plant_typeStringspecification of plant type
n2Float64factor between 0.0 and 1.0
...Float64factor between 0.0 and 1.0
Example :availplanttypenodal

| plant_type | n1     | n2     |
|--------|--------|--------|
| solar  | 0.1    | 0.2    |
| solar  | 0.8    | 0.9    |
| solar  | 0.7    | 0.8    |
| solar  | 0      | 0      |
Danger

It is necesarry to use one file per plant type!


Index Linking

The plant type defined in the plant_type column must be defined in File Structure :types. Each column name after the plant_type column must reference a node via the index defined in the index column of File Structure :nodes.


:avail_planttype_zonal

Availability of a specified planttype at a given market zone.

ColumnTypeDescription
zoneStringspecification of plant type
type 1Float64factor between 0.0 and 1.0
type 2Float64factor between 0.0 and 1.0
...Float64factor between 0.0 and 1.0
Example :availplanttypezonal
|zone    | solar  | wind   |
|--------|--------|--------|
|  DE    | 0.1    | 0.4   |
|  DE    | 0.8    | 0.6    |
|  DE    | 0.7    | 0.8    |
|  DE    | 0      | 0.6     |
Index Linking

The zone defined in the zone column must be defined in File Structure :zones. Each column name after the zone column must reference a plant type via the index defined in the index column of File Structure :types.


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 |
Index Linking

Each column name must reference a node via the index defined in the index column of File Structure :nodes


File Structure :zones

Specifies the geographic or administrative zones involved in the model.

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

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).
Index Linking

index used in File Structure :plants, :avail_planttype_nodal, File Structure :nodes and File Structure :lines. The zone defined in the zone column must be defined in File Structure :zones.


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.
Index Linking

The node ID defined in the node_i and node_j column must be defined in File Structure :nodes.


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.
Index Linking

The node ID defined in the node_i and node_j column must be defined in File Structure :nodes.


Example

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

Prosumers: File Structure generation

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

Index Linking

The column node must be defined in File Structure :nodes. The index is used in Prosumers: File Structure :prs_demand.


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.)
Index Linking

The column name must be defined in Prosumers: File Structure generation.


Example

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

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