LSGrid module (doc in progress)

The main class of the lightsim2grid python package is the LSGrid class, that is a python class created from the the c++ LSGrid (thanks fo pybind11).

This class basically represents a powergrid (what elements it is made for, their electro technical properties etc.)

To create such class, for now the only way is to get it from a pandapower grid (and it does not model every elements there !)

For example, you can init it like (NOT RECOMMENDED, though sometimes needed):

from lightsim2grid.network import init
pp_net = ...  # any pandapower grid eg. pp_net = pn.case118()

lightsim_grid_model = init(pp_net)  # some warnings might be issued as well as some warnings

A better initialization is through the lightsim2grid.LightSimBackend.LightSimBackend class:

from lightsim2grid.network import init
# create a lightsim2grid "gridmodel"
env_name = ... # eg. "l2rpn_case14_test"
env = grid2op.make(env_name, backend=LightSimBackend())
grid_model = env.backend._grid

Warning

We do not recommend to manipulate directly the lightsim2grid.network.LSGrid directy, but to use it via the backend class. This is much more tested this way.

Elements modeled

Generators (standard)

Static Generators (more exotic)

Loads and Storage Units

Shunts

Lines

Transformers

DC Powerlines (more exotic)

Detailed documentation