{ "cells": [ { "cell_type": "code", "metadata": { "ExecuteTime": { "end_time": "2025-09-15T11:26:14.833678Z", "start_time": "2025-09-15T11:26:14.415381Z" } }, "source": [ "import pypowsybl as pp" ], "id": "62556024c53fd36", "outputs": [], "execution_count": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load a node/breaker test network" ], "id": "efca261898913b77" }, { "cell_type": "code", "metadata": { "ExecuteTime": { "end_time": "2025-09-15T11:26:14.842549Z", "start_time": "2025-09-15T11:26:14.838617Z" } }, "source": [ "n = pp.network.create_four_substations_node_breaker_network()" ], "id": "3e27bcd4a9bb502e", "outputs": [], "execution_count": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Get substation data frame" ], "id": "107c4bc399df98d0" }, { "cell_type": "code", "metadata": { "ExecuteTime": { "end_time": "2025-09-15T11:26:14.900854Z", "start_time": "2025-09-15T11:26:14.895322Z" } }, "source": [ "substations = n.get_substations()" ], "id": "c1cb034bece7cd32", "outputs": [], "execution_count": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print substation data frame" ], "id": "f461affde7714b23" }, { "cell_type": "code", "metadata": { "ExecuteTime": { "end_time": "2025-09-15T11:26:14.961908Z", "start_time": "2025-09-15T11:26:14.952501Z" } }, "source": [ "substations" ], "id": "2a47ef9f6015213d", "outputs": [ { "data": { "text/plain": [ " name TSO geo_tags country\n", "id \n", "S1 \n", "S2 \n", "S3 \n", "S4 " ], "text/html": [ "
| \n", " | name | \n", "TSO | \n", "geo_tags | \n", "country | \n", "
|---|---|---|---|---|
| id | \n", "\n", " | \n", " | \n", " | \n", " |
| S1 | \n", "\n", " | \n", " | \n", " | \n", " |
| S2 | \n", "\n", " | \n", " | \n", " | \n", " |
| S3 | \n", "\n", " | \n", " | \n", " | \n", " |
| S4 | \n", "\n", " | \n", " | \n", " | \n", " |