Do-a-thon: Julia models for Energy system optimization (best practices and next steps)

Do-a-thon: Julia models for Energy system optimization

As a discussion basis the do-a-thon will start with a 10 min input-talk that compares the data flow for a simple 3-bus generator/storage/network example in EnergyModels.jl, PowerSystems.jl/PowerSimulation.jl (refactor-branch), PSA.jl and PowerModels.jl (and probably Joulia.jl).

The comparison should be helpful for some previously proposed do-a-thons, especially about PowerDynamics.jl (@Sabine_elena, @timk) and maybe the one about the PandaPower<->PowerModels.jl bridge (@leon.thurner).

We’ll then aim at two more steps.

1. Dicuss and formulate best-practices for

  • handling electricity system parameters (input data):
    explicit types for single elements (PowerModels/PowerSystems) <-> tables with conventions for classes of generators (EnergyModels/PSA).
  • choosing the model formulation using dispatch on type hierarchies like PowerModels (DCPPowerModel/ACPPowerModel) or PowerSimulation’s (Dispatch- and
    CommitmentForm).
  • (conventions for storing and managing the associated jump variables and
    constraints)
  • retrieving and storing solution data

Hopefully, we’ll be convinced that the PowerSystems.jl/...Simulation.jl
momentum is big enough (and the memory overhead solvable enough), that in the

2. Adjoining hack-a-thon

  • We open tickets on their project for features missing for our concrete projects.
  • We start the implementation of exporters/importers to PowerSystems.jl from
    PyPSA and other interested frameworks.

Outcomes

  • Wiki entry about Best practices for Julia models with details about the model differences
  • Tickets on PowerSystems.jl/PowerSimulation.jl for feature “requirements” (requests).
7 Likes

Documentation of do-a-thon

Slides and notebook version 2: EnergyOptimizationInJulia.zip (62.2 KB)

The principal output has been the following table. I’ll try to provide a bit more detail over the next week.

  Joulia PowerModels PowerSystems/PowerSimulation EnergyModels
Storage of        
- Parameters Flat types: Nodes, Lines, PowerPlants, RenewableEnergySource, Storages, which contain dictionaries for each parameter indexed by names Matpower files are parsed into a nested structure of dictionaries. ref() - Getter helps with access Nested detailed type hierarchy to hold data for individual components in PowerSystems.jl, possibility for extension, importers from matpower and raw Parameters are fetched on demand from a NetCDF backend as flexibly dimensioned DenseAxisArrays
- Variables Inside JuMP Model: model[:MarketClearing] Variables and Constraints are equally sorted into nested dictonaries using the helper functions var() and con() Stored in dictionary on canonical_model.{variables,constraints} mapping a chosen symbols to DenseAxisArrays Variables and constraint are stored on the JuMP model with a dedicated prefix involving the class name
Primary focus/features Economic dispatch with thermal and renewable generators, storage units including linearized powerflows (based on PTDF) Framework for reference implementations and easy comparison of several power flow formulations, with extensions for several timesteps, storage und network expansion Production cost modelling with flexible device model representations, Priority focus has been on operational models, Capacity expansion is coming up, integration with PowerDynamics is planned Co-Optimization of transmission, storage and generation capacities under linearized optimal power flow constraints for large networks