Feedback wanted: how PyPSA and oemof were assessed in a benchmark of optimization tools for industrial Power-to-X

Hi all,

we are preparing a journal paper that benchmarks energy system optimization tools for techno-economic feasibility studies of industrial Power-to-X plants. It builds on the master’s thesis of Dominik Simeunovic at TU Darmstadt. Six tools are applied to the same case study and scored with a weighted multi-criteria scheme: the open-source frameworks PyPSA and oemof, and four commercial tools.

The commercial tools’ providers review the assessment of their tool before publication. Since there is no single provider for the open-source frameworks, we would like to ask this community instead: Are any of the statements or scores below wrong or incomplete? We rated a capability as not available if we could not find it in the tool or its documentation, so pointers to features we missed (ideally with a link to the docs or an example) are especially welcome. Where the feedback is justified, we will revise the scores.

We would appreciate feedback by 30 November 2026, here in the thread or by e-mail (benjamin.freischlad@mmes.tu-darmstadt.de).

Case study

An islanded industrial power-to-ammonia plant: a PV plant and a wind farm supply the plant via a 48 km high-voltage line, buffered by a battery (BESS). Hydrogen from a 240 MW_DC electrolyser is fed to the Haber-Bosch (HB) reactor directly or via compression and storage; a cryogenic air separation unit (ASU) supplies nitrogen. All capacities except the electrolyser and the hourly dispatch over one year are optimized for a fixed annual production of 121,800 t of ammonia, with minimum loads of 30 % (HB) and 70 % (ASU). Both models are LPs solved with HiGHS; the code will be published with the paper.

Scoring scheme

Overall score = weighted sum of five criteria: value chain completeness (30 %), representation of technical constraints (20 %), advanced modelling capabilities (20 %), output quality (15 %), user-friendliness (15 %). The weights are exemplary; readers will be able to adjust them in an interactive dashboard. Unless stated otherwise, a sub-criterion gets 10 points if fully supported, 5 if only partially, via a workaround or not considered during sizing, and 0 if not supported.

Preliminary scores

Sub-criterion PyPSA oemof.solph
Value chain completeness (each 1/7)
Endogenous RE profiles 0: profiles must be supplied externally (atlite is a separate tool) 0: profiles must be supplied externally (feedinlib is a separate package)
Grid and HV connection 10: HV line as Link with efficiency and endogenous sizing 10: HV line as Converter with losses and Investment object
BESS 5: StorageUnit with fixed energy-to-power ratio and round-trip efficiency, but no minimum state of charge 10: GenericStorage covers all BESS parameters
Electrolysis 10: Link 10: Converter with conversion factors
H2 compression and storage 10: multi-port Link and Store 10: Converters and storage
ASU 10: Link 10: Converter
HB synthesis 10: multi-port Link 10: Converter
Technical constraints (each 1/5)
Minimum load (full points only if both permanent operation and shut-downs can be represented and the case study remains solvable with either) 10: p_min_pu (shut-downs: committable, test pending) 10: minimum on flows (shut-downs: NonConvex, test pending)
Ramp rates 10: native ramp limits 10: gradient limits on flows
Part-load efficiency 5: piecewise part-load efficiency, but not combinable with endogenous sizing 10: OffsetConverter (one segment; requires NonConvex, i.e. MILP)
Degradation 5: via time-varying efficiencies, precomputed by the user 5: via time series or the experimental multi-period mode
Stack replacement 5: via annualized cost outside the tool; lifetime attribute not usable in a single-period setup 5: outside the tool or via the experimental multi-period mode
Advanced modelling capabilities (each 1/3)
Joint beginning- and end-of-life sizing in one run 5: multi-period optimization with time-varying efficiency, precomputed 5: multi-period mode with lifetimes
LCOA minimization with production volume as decision variable 5: via Dinkelbach iteration around the tool 5: via Dinkelbach iteration around the tool
Multiple climate years (probabilistic) 10: native stochastic scenarios 0: no multi-climate-year feature found
Output quality
Levelized costs (30 %; 0.8 x provided natively + 0.1 x formula transparent + 0.1 x formula adaptable) 6.0: not native but user-implemented (5), hence transparent (10) and adaptable (10) 6.0: same as PyPSA
Sensitivity analysis (10 %; 0.8 x availability + 0.1 x parameter scope + 0.1 x output format) 5.0: via a user loop (5); any parameter (10); no prepared output (0) 5.0: same as PyPSA
Result visualization (30 %; +2 per element: summary, component-level charts, dispatch, energy-flow diagram, interactivity) 7: summary (2), component-level (2) and dispatch plots (2) via the statistics module; energy balance plot as partial energy-flow diagram (1); no interactive dashboard (0) 4: no summary (0) or component-level charts (0); dispatch plots (2) and Sankey diagrams (2) via the visualization package; no dashboard (0)
Data export (30 %; +2 per element: results extractable, summary in a standard format, time series in open formats, inputs exportable, complete export ready for analysis) 8: structured results (2); summary (2) and time series (2) to CSV/Excel; full network incl. inputs to netCDF (2); no complete export ready for analysis without processing (0) 8: structured results (2); summary (2) and time series (2) to CSV/Excel; component parameters exportable (2); no complete export ready for analysis (0)
User-friendliness
GUI (80 %; ISO 9241-110 principles) 0: code-based, no GUI 0: code-based, no GUI
Transparency (10 %; mean of formulation, assumptions, traceability) 10.0: all fully documented and traceable 10.0: formulation in the API docs, defaults listed, model printable
Solving time (10 %; ranking of six tools) 2: about 27 min (fifth) 4: about 19 min (fourth)
Overall score 6.29 5.93

Two points that would particularly benefit from community feedback:

  • PyPSA, BESS: is there a way to set a minimum state of charge (maximum depth of discharge) for a StorageUnit that we overlooked, other than modelling the battery as Store and Links?
  • PyPSA, part-load efficiency: can piecewise efficiencies be combined with capacity expansion (p_nom_extendable)?

Thanks a lot for your help!

Benjamin Freischlad, Dominik Simeunovic and Jil-Jasmin Thoede
Technology and Economics of Multimodal Energy Systems Lab (MMES), TU Darmstadt

Hi @bfreischlad,

thanks for asking. To me (as an oemof maintainer), your evaluation looks correct. However, please note that it might be the nature of collaborative open source projects, that we have a more modular structure. Besides the tools in the same community (atlite for PyPSA, feedinlib and windpowerlib for oemof), there is proven (and maintained) compatibility to more focused tools like PVlib. In that sense, I consider “Endogenous RE profiles” somewhat misleading. In fact, you also count our (separate) “visualization package” (oemof.visio). So, if we just renamed windpowerlib to oemof.wind, you would count it? (Honestly, we are doing that for demandlib, which will be oemof.demand.)

Years ago, we moved from a commercial tool to oemof.solph because of compatibility to other tools. The previous tool had a GUI, profile generation, and a lot of other features included. However, the scripting interface crashed very often and was barely compatible to other tools. Now, we have one tool that can efficiently do its defined task, that works in a toolchain with other focused tools. Want multi-objective optimization of component sizes? Take e.g. pymoo to set the respective parameters. Want a GUI to set up system layouts? OpenPlan runs in your browser. (It does not support all solph features, yet, but you can already host an instance yourself.) Want a dashboard? As results are given as Pandas dataframes and the graph can be exported to networkx, you can easily use dash (cf. Interactive solph graph using Dash).

Sure, there is some entry barrier to this, i.e. you need someone to plug together the toolchain. (You might even be able to vibe-code this without too much experience. It’s unlikely that you will get slop results as it’s combining puzzle pieces instead of coding from scratch.) But in the end, you are very flexible and you are able to understand (or even modify) the details of individual modules more easily than a big package.

2 Likes

Back about the year 2000, a masters student from Australia, who was undertaking a review of software to support cogeneration, contacted me about the deeco CLI framework. She wanted screenshots and no amount of email traffic could convince her that analytical software could happily run without GUIs.

Thank you for the helpful response.
We will consider this feedback, discuss it internally and make sure the scoring is consistent.

BR

I would also include the cost function flexibility in that comparison. A single overnight cost might be fine for linearly scaling components, but for things like ASU or HB you want to use sth more realistic (if you want to size them at all - as usually OEMs can only offer fixed capacities).

Oemof has an Investment Offset which is kind of useful to avoid very small capacity buildouts and you can use it to again model a specific cost curve which reduces with higher capacity.

I read that you can also approximate cost curves in pypsa but I have to admit I haven’t tried it yet.