Skip to content

PyPSA-ASEAN: A flexible Python-based open optimisation model to study energy system futures in the ASEAN region

Notifications You must be signed in to change notification settings

pypsa-meets-earth/pypsa-asean

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6,425 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPSA-ASEAN: A flexible Python-based open optimisation model to study energy system futures in the ASEAN region.

Made using PyPSA-Earth by

Development Status: Ongoing Validation

Test workflows Documentation Status Size License: AGPL v3 REUSE status Code style: black pre-commit.ci status Discord Google Drive DOI

PyPSA-ASEAN: An ASEAN-Focused Sector-Coupled Open-Source Multi-Energy System Model

elec-ASEAN

PyPSA-ASEAN is the first open-source ASEAN-wide cross-sectoral energy system model with high spatial and temporal resolution. It builds on the existing PyPSA-Earth framework and integrates region-specific data tailored to the context of the Southeast Asia region. It aims to leverage the ongoing improvements in PyPSA-Earth using the soft-fork strategy while making it as easy as possible for users to create validated models of individual ASEAN countries or the entire region at once.

The following countries are available to use in this model:

  • 🇧🇳 Brunei
  • 🇰🇭 Cambodia
  • 🇮🇩 Indonesia
  • 🇱🇦 Laos
  • 🇲🇾 Malaysia
  • 🇲🇲 Myanmar
  • 🇵🇭 Philippines
  • 🇸🇬 Singapore
  • 🇹🇭 Thailand
  • 🇹🇱 Timor-Leste
  • 🇻🇳 Vietnam

PyPSA-Earth: A Global Sector-Coupled Open-Source Multi-Energy System Model

PyPSA-Earth is the first open-source global cross-sectoral energy system model with high spatial and temporal resolution. The workflow provide capabilities for modelling the energy systems of any country in the world, enabling large-scale collaboration and transparent analysis for an inclusive and sustainable energy future. PyPSA-Earth is suitable for both operational studies and capacity expansion studies. Its sector-coupled modeling capabilities enable features for the detailed optimization of multi-energy systems, covering electricity, heating, transport, industry, hydrogen and more.

All the data needed for a simulation are automatically and flexibly retrieved from open sources. This includes, in particular, energy demand across sectors, generation capacities, medium- to high-voltage networks, and renewable energy potentials. Custom datasets can also be integrated as needed, and kept private if required. At the same time, PyPSA-Earth-Status provides functionality to share regional insights. If you are willing to contribute your regional expertise, feel free to open an issue there.

PyPSA-Earth is capable of providing the modelling evidence needed to translate the implications of energy scenarios into actionable regional strategies. By making this tool openly available, we aim to foster collaboration, innovation, and informed decision-making to support sustainable and efficient energy solutions worldwide.

Details on the model are available in the following academic publications:

  • power model M. Parzen et all. "PyPSA-Earth: A new global open energy system optimization model demonstrated in Africa", Applied Energy, 341, 2023. https://doi.org/10.1016/j.apenergy.2023.121096
  • sector-coupled model H. Abdel-Khalek et al. "PyPSA-Earth sector-coupled: A global open-source multi-energy system model showcased for hydrogen applications in countries of the Global South", Applied Energy, 383, 2025. https://doi.org/10.1016/j.apenergy.2025.125316

PyPSA meets Earth is an independent research initiative developing a powerful energy system model for Earth. We work on open data, open source modelling, open source solver support and open communities. Stay tuned and join our mission - We look for users, co-developers and leaders!

Figure: Example power systems build with PyPSA-Earth.
See images of ~193 more countries at Zenodo

The diagram below depicts one representative clustered node for the sector-coupled model with its generation, storage and conversion technologies.

Livetracker. Most popular global models:

How to get involved

There are multiple ways to get involved and learn more about our work:

  1. Join our Discord Server to connect in discussion channels, get help in the support forum, and join our meetings
  2. Chat on Discord with us in the following open meetings:
    • General initiative meeting for project news and high-level code updates. Held every fourth Thursday 16-17:00 (UK time) and is a perfect place to meet the community and get a high-level update on PyPSA ecosystem relevant for PyPSA-Earth developments.
    • Weekly developers meetings
      • Eastern-Hemisphere friendly Morning meeting every Thursday at 09:00 (UK time).
      • Western-Hemisphere friendly Evening meeting every Thursday 16:00 (UK time). Every forth Thursday is replaced by the General initiative meeting which has a more high-level perspective, but you can also join to discuss more particular questions.
  3. Look at public materials at google Drive to share to minutes, presentations, lists and documents. Feel gree to get a look!
  4. Notify your interest to on-demand meetings:
    • On-demand meetings
      • Demand creation and prediction meeting
      • AI asset detection meeting
      • Outreach meeting for planning, discussing events, workshops, communication, community activities
  5. Join us and propose your stream.
  6. Participate in mapping power grids on OpenStreetMap project through the MapYourGrid initiative. Many resources as video tutorials or starter-kit help to improve open data that is used by PyPSA-Earth to build the grid topology.

Installation

  1. Open your terminal at a location where you want to install pypsa-earth. Type the following in your terminal to download the package from GitHub:

    .../some/path/without/spaces % git clone https://github.com/pypsa-meets-earth/pypsa-earth.git
  2. The python package requirements are curated in the envs/{your operating system}64.lock.yaml file.

    • On linux, the environment can be installed using:
      .../pypsa-earth % conda env create -f envs/linux-64.lock.yaml
    • On newest macOS (arm-based), the environment can be installed using:
      .../pypsa-earth % conda env create -f envs/osx-arm64.lock.yaml
      On non-arm macOS, the environment can be installed using:
      .../pypsa-earth % conda env create -f envs/osx-64.lock.yaml
    • On Windows, the environment can be installed using:
      .../pypsa-earth % conda env create -f envs/win-64.lock.yaml
    
    If the above takes longer than 30 min, you might want to try mamba for faster installation:
    
    ```bash
    (base) conda install -c conda-forge mamba
    
    .../pypsa-earth % mamba env create -f envs/{{your operating system}}64.lock.yaml.yaml
    
  3. (optional) In step 2, three solvers are installed: HiGHs, glpk and gurobi. HiGHs is the recommended open-source solver. Gurobi is generally faster, but requires a license for full functionality, which is freely available to academics (see instructions website).

  4. To use jupyter lab (new jupyter notebooks) continue with the ipython kernel installation and test if your jupyter lab works:

    .../pypsa-earth % ipython kernel install --user --name=pypsa-earth
    .../pypsa-earth % jupyter lab
  5. Verify or install a java redistribution from the official website or equivalent. To verify the successful installation the following code can be tested from bash:

    .../pypsa-earth % java -version

    The expected output should resemble the following:

    java version "1.8.0_341"
    Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

Running the model in previous versions

The model can be run in previous versions by checking out the respective tag. For instance, to run the model in version 0.8.0, which is the last version before the recent PyPSA update, the following command can be used:

git checkout v0.8.0

After checking out the tag, the model can be run as usual. Please make sure to use the environment built for the respective version.

Test run on tutorial

  • In the folder open a terminal/command window to be located at this path ~/pypsa-earth/

  • Activate the environment conda activate pypsa-earth

  • Rename config.tutorial.yaml to config.yaml. For instance in Linux:

    mv config.tutorial.yaml config.yaml
  • Run a dryrun of the Snakemake workflow by typing simply in the terminal:

    snakemake -j 1 solve_all_networks -n

    Remove the -n to do a real run. Follow the tutorial of PyPSA-Eur 1 and 2 on YouTube to continue with an analysis.

Training

  • We recently updated some hackathon material for PyPSA-Earth. The hackathon contains jupyter notebooks with exercises. After going through the 1 day theoretical and practical material you should have a suitable coding setup and feel confident about contributing.
  • The get a general feeling about the PyPSA functionality, we further recommend going through the PyPSA and Atlite examples.

Questions and Issues

  • We are happy to answer questions and help with issues if they are public. Through being public the wider community can benefit from the raised points. Some tips. Bugs and feature requests should be raised in the GitHub Issues. General workflow or user questions as well as discussion points should be posted at the GitHub Discussions tab. Happy coding.

Documentation

The documentation is available here: documentation.

Collaborators

<<<<<<< HEAD <<<<<<< HEAD ======= >>>>>>> pypsa-earth/main ======= >>>>>>> main
sophiabrl
sophiabrl
virio-andreyana
virio-andreyana
filleafkhr
filleafkhr
davide-f
davide-f
ekatef
ekatef
pz-max
pz-max
hazemakhalek
hazemakhalek
energyLS
energyLS
GbotemiB
GbotemiB
yerbol-akhmetov
yerbol-akhmetov
danielelerede-oet
danielelerede-oet
DeniseGiub
DeniseGiub
FabianHofmann
FabianHofmann
Eddy-JV
Eddy-JV
mnm-matin
mnm-matin
finozzifa
finozzifa
doneachh
doneachh
Tomkourou
Tomkourou
Eric-Nitschke
Eric-Nitschke
GridGrapher
GridGrapher
drifter089
drifter089
martacki
martacki
glenkiely-ieg
glenkiely-ieg
ljansen-iee
ljansen-iee
Emre-Yorat89
Emre-Yorat89
giacfalk
giacfalk
Ekaterina-Vo
Ekaterina-Vo
euronion
euronion
lkstrp
lkstrp
TosinGeorge
TosinGeorge
LukasFrankenQ
LukasFrankenQ
AnasAlgarei
AnasAlgarei
Ly0n
Ly0n
Tooblippe
Tooblippe
Femkemilene
Femkemilene
SermishaNarayana
SermishaNarayana
carlosfv92
carlosfv92
cpschau
cpschau
arizeosalac
arizeosalac
AlexanderMeisinger
AlexanderMeisinger
asolavi
asolavi
rajesh-ieg
rajesh-ieg
LucieRC
LucieRC
choiHenry
choiHenry
gianvicolux
gianvicolux
kma33
kma33
milyas009
milyas009
Netotse
Netotse
PierreKara1
PierreKara1
pitmonticone
pitmonticone
siddharth-krishna
siddharth-krishna
squoilin
squoilin
juli-a-ko
juli-a-ko
ollie-bell
ollie-bell
rsparks3
rsparks3
saikumarvasa100-hash
saikumarvasa100-hash
jome1
jome1
jessLryan
jessLryan
jarry7
jarry7
huyhoang-mike
huyhoang-mike
HanaElattar
HanaElattar
Vamsipriya22
Vamsipriya22
flacombe
flacombe
EmreYorat
EmreYorat
AndreCNF
AndreCNF
AlexanderMeisinger
AlexanderMeisinger
AlessandroPampado99
AlessandroPampado99

About

PyPSA-ASEAN: A flexible Python-based open optimisation model to study energy system futures in the ASEAN region

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.6%
  • Other 0.4%