Quickstart

June 26, 2026 ยท View on GitHub

The ToOp repository contains a lot of functionality, which can be overwhelming if you look at it for the first time. But you do not need to understand all of them to use the parts of importance to you.

However, it is helpful to grasp some of the key concepts and data structures. If you want to do this first, please refer to Usage.

Understand by examples

We provide you with a couple of examples on how to use the repo.

If you want to jump straight into the full-fletched topological optimization, check out notebooks/example3_e2e_pipeline.ipynb. You can run any grid file (compatible with PyPowsybl) of your choice and investigate the effects. If you want to take smaller steps, start with notebooks/example1_dc_loadflow_example.ipynb. After that, take a look at notebooks/example2_small_grid_toop.ipynb. This notebook optimizes a small node-breaker grid and displays the changes in the effected substation.

Most workflows start by turning a raw grid file into a processed grid folder. The importer creates the backend grid snapshot, masks, loadflow parameters, and topology metadata; [load_grid][toop_engine_dc_solver.preprocess.load_grid] then adds static_information.hdf5, action_set.json, action_set_diffs.hdf5, and the final nminus1_definition.json used by the solver and optimizer.