Skip to content

oHYSEM is a Python library designed to provide optimal planning, operation, and management strategies for hybrid renewable electricity-hydrogen systems. It enables both stand-alone and grid-connected systems to participate in energy and hydrogen markets, ensuring the integration of new assets and efficient system scheduling.

License

Notifications You must be signed in to change notification settings

IIT-EnergySystemModels/oHySEM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

optimized Hybrid Systems for Energy and Market management (oHySEM)


PyPI PyPI - Python Version Read the Docs Codacy Badge PyPI - License Pepy Total Downloads

Simplicity and Transparency in Power Systems Operation and Planning

oHySEM is an open-source model distributed as a Python library, designed to provide optimal planning, operation, and management strategies for hybrid renewable electricity-hydrogen systems. It supports both stand-alone and grid-connected systems in participating in electricity and hydrogen markets, ensuring the seamless integration of new assets and efficient system scheduling.

How to Cite

If you use oHySEM in your research, please cite the following publication:

  • E.F. Alvarez, P. Sánchez-MartĂ­n and A. Ramos, "Self-Scheduling for a Hydrogen-Based Virtual Power Plant in Day-Ahead Energy and Reserve Electricity Markets," 20th International Conference on the European Energy Market (EEM), Istanbul, Turkiye, June 2024, pp. 1-6, 10.1109/EEM60825.2024.10608848.

BibTeX entry:

@INPROCEEDINGS{10608848,
  author={Alvarez, Erik F. and Sánchez-Martín, Pedro and Ramos, Andrés},
  booktitle={2024 20th International Conference on the European Energy Market (EEM)},
  title={Self-Scheduling for a Hydrogen-Based Virtual Power Plant in Day-Ahead Energy and Reserve Electricity Markets},
  year={2024},
  volume={},
  number={},
  pages={1-6},
  doi={10.1109/EEM60825.2024.10608848}
}

---

Table of Contents

  1. Overview
  2. Features
  3. Architecture
  4. Installation
  5. Usage
  6. Use Cases
  7. Contributing
  8. License

---

Overview

oHySEM provides a robust framework for optimizing hybrid energy systems, incorporating renewable electricity and hydrogen networks. The library is designed for users needing advanced tools for integrated resource planning, asset integration, system scheduling, and market participation in electricity and hydrogen markets.

Key Applications:

  • Optimal Planning & Scheduling: Ensure efficient energy resource management in hybrid systems.
  • Integrated Resource Planning (IRP): Plan long-term energy strategies integrating multiple energy sources.
  • Market Participation: Engage in real-time electricity markets and future hydrogen markets.
  • Asset Integration: Seamlessly incorporate new assets (e.g., renewable generators, storage units) into the system.
  • Self-scheduling: Operation planning of the hybrid system.

---

Features

oHySEM offers a comprehensive suite of features for advanced energy system management:

  • Integrated Energy System Modeling:
    • Simulate and optimize hybrid systems combining renewable electricity sources (e.g., Solar PV, Wind), conventional generation (e.g., CCGT), and hydrogen technologies (production, storage).
    • Model Battery Energy Storage Systems (BESS) for short-term flexibility.
  • Multi-Horizon Planning and Optimization:
    • Long-Term Asset Planning: Support for strategic decisions on the optimal location and sizing of new energy assets (hydrogen tanks, BESS units, generation).
    • Mid-Term Asset Optimization: Tools for yearly planning to optimize asset utilization and adapt to market changes.
    • Short-Term Operational Planning: Detailed weekly and daily operational scheduling with fine-grained temporal resolution (15-minute to 1-hour intervals).
  • Advanced Operational Capabilities:
    • Hydrogen and Battery Optimization: Optimize the coordinated operation of hydrogen systems (electrolyzers, storage) and BESS.
    • Efficient Scheduling: Align system operations with energy demands, grid requirements, and market conditions in real-time.
  • Comprehensive Market Participation:
    • Multi-Market Integration: Participate in various electricity markets, including day-ahead, intraday, real-time, and secondary reserve markets.
    • Profitability Maximization: Optimize market bids and reserve contributions to enhance profitability.
    • Imbalance Management: Address deviations in energy supply and demand through effective imbalance settlement mechanisms.
  • System Design and Scalability:
    • Grid-Connected & Stand-Alone Systems: Model both grid-connected systems interacting with the broader network and self-sufficient off-grid systems.
    • Flexible Asset Integration: Dynamically incorporate new energy assets into system models.
    • Scalable Architecture: Suitable for a range of applications from small-scale VPPs to large-scale hybrid power plants.
    • Support for Various Solvers: Compatible with Gurobi, HiGHS, SCIP, GLPK, and CBC.

---

Architecture

oHySEM is built around a core optimization model developed in Python using the Pyomo library. The main logic resides in oHySEM/oHySEM.py.

The system takes input data primarily from CSV files, typically located in a case-specific directory (e.g., oHySEM/VPP1/). These files define parameters for the energy system, market conditions, and other operational constraints.

oHySEM processes this data to find optimal strategies and outputs the results in CSV format for detailed analysis and generates various plots for visualization.

A Streamlit-based API (oHySEM/oHySEM_API.py) is also available to provide a user interface for interacting with the model.

The following diagram illustrates the general system components and interactions that oHySEM models:

oHySEM System Architecture

---

Installation

Installing solvers:

  • Gurobi: conda install -c gurobi gurobi
  • HiGHS: pip install highspy
  • SCIP: conda install -c conda-forge pyscipopt
  • GLPK: conda install glpk

You can list available Pyomo solvers by running:

pyomo help -s

Installing oHySEM via pip:

pip install ohysem

For the full setup guide, refer to the installation guide.

From GitHub:

  1. Clone the oHySEM repository
  2. Navigate to the folder: cd path_to_repository
  3. Install with: pip install .

Solvers:

Additional requirements:

---

Usage

Running oHySEM:

After installation, you can run the model via the command line:

oHySEM

or using the Python script:

python -m oHySEM --dir {path_to_input_data} --case {case_name} --solver {solver_name}

Running the API:

To run the Streamlit API, navigate to the directory containing the oHySEM_API.py file (typically the root of the oHySEM package or the repository root if running from source) and execute:

streamlit run oHySEM_API.py

This will open the interface in your web browser.

The Streamlit API provides an interactive web interface for a more user-friendly workflow with oHySEM. Key functionalities include:

  • Project and Run Configuration:
    • Set essential parameters for the model run such as the case directory, specific case name, choice of solver, and simulation start date and duration.
    • Toggle options for saving detailed raw results and generating plots.
  • Input Data Management and Modification:
    • Time Horizon: Define the active time steps for the simulation by adjusting the oH_Data_Duration_{case_name}.csv file.
    • Electricity Tariffs: Activate or deactivate specific electricity purchase tariffs. This modifies oH_Data_ElectricityCost_{case_name}.csv by setting costs for deactivated tariffs to a high prohibitive value.
    • Hydrogen Demand:
      • Configure overall H2 demand parameters like DemandType (Hourly, Daily, Weekly), TargetDemand, and RampDemand (modifies oH_Data_Parameter_{case_name}.csv).
      • Detail daily demand profiles using a dynamic scheduler for up to 6 time segments (modifies oH_Data_HydrogenSchedule_{case_name}.csv).
    • H2 Market Conditions: Set market prices for selling H2 and costs for buying H2.
    • Technology Parameters: Adjust operational parameters for specific units of various technologies (Electrolyzers, Wind, Solar PV, BESS, H2ESS), impacting their respective data files. For example, changes to Wind/Solar PV capacities will proportionally scale their VarMaxGeneration data.
    • Changes to these datasets can be saved directly through the interface.
    • The API also allows for visualization of various input time series data (e.g., electricity prices, demand forecasts) before running the model.
  • Model Execution:
    • Launch the oHySEM optimization model directly from the interface using the configured settings and modified data.
    • Receive feedback on the execution status (success or error).
  • Result Visualization:
    • KPI Dashboard: View key performance indicators such as total net cost, hydrogen production, and electricity sales/purchases.
    • Interactive Charts: Explore results through various Altair charts, including operating costs, energy balances (electricity and hydrogen), storage levels (BESS and H2ESS), and electrolyzer commitment status.

This interface facilitates scenario analysis by allowing users to easily modify inputs, run the model, and immediately see the impact on results through integrated visualizations.

---

Use Cases

  • Grid-connected Hybrid Systems: Optimize energy flows between electricity and hydrogen markets while meeting grid regulations.
  • Stand-alone VPPs: Use oHySEM to ensure optimal operation for off-grid renewable systems.
  • Integrated Resource Planning (IRP): Plan the addition of new renewable assets and storage units to meet long-term energy goals.
  • Market Participation: Optimize market bids for both electricity and future hydrogen markets.

---

Contributing

Contributions to oHySEM are welcome! Please refer to our Contributing Guide for more information on how to contribute to the project.

---

License

oHySEM is licensed under the GPL-3.0 license. See the LICENSE file for details.

---

About

oHYSEM is a Python library designed to provide optimal planning, operation, and management strategies for hybrid renewable electricity-hydrogen systems. It enables both stand-alone and grid-connected systems to participate in energy and hydrogen markets, ensuring the integration of new assets and efficient system scheduling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages