|
15 | 15 | },
|
16 | 16 | {
|
17 | 17 | "cell_type": "code",
|
18 |
| - "execution_count": 2, |
19 |
| - "metadata": {}, |
| 18 | + "execution_count": 1, |
| 19 | + "metadata": { |
| 20 | + "ExecuteTime": { |
| 21 | + "end_time": "2025-08-11T10:35:43.558159Z", |
| 22 | + "start_time": "2025-08-11T10:35:39.074640Z" |
| 23 | + } |
| 24 | + }, |
20 | 25 | "outputs": [
|
21 | 26 | {
|
22 | 27 | "name": "stderr",
|
23 | 28 | "output_type": "stream",
|
24 | 29 | "text": [
|
25 |
| - "\u001B[32m2024-04-30 11:20:03.169\u001B[0m | \u001B[1mINFO \u001B[0m | \u001B[36mpypsdm.models.gwr\u001B[0m:\u001B[36mfrom_csv\u001B[0m:\u001B[36m275\u001B[0m - \u001B[1mReading grid from /Users/thomas/coding/python/pypsdm/pypsdm-feature/tests/resources/simbench/input\u001B[0m\n", |
26 |
| - "\u001B[32m2024-04-30 11:20:03.344\u001B[0m | \u001B[34m\u001B[1mDEBUG \u001B[0m | \u001B[36mpypsdm.models.primary_data\u001B[0m:\u001B[36mfrom_csv\u001B[0m:\u001B[36m266\u001B[0m - \u001B[34m\u001B[1mNo primary data in path /Users/thomas/coding/python/pypsdm/pypsdm-feature/tests/resources/simbench/input\u001B[0m\n", |
27 |
| - "\u001B[32m2024-04-30 11:20:03.344\u001B[0m | \u001B[1mINFO \u001B[0m | \u001B[36mpypsdm.models.gwr\u001B[0m:\u001B[36mfrom_csv\u001B[0m:\u001B[36m287\u001B[0m - \u001B[1mReading results from /Users/thomas/coding/python/pypsdm/pypsdm-feature/tests/resources/simbench/results\u001B[0m\n" |
| 30 | + "\u001b[32m2025-08-11 12:35:40.609\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpypsdm.models.gwr\u001b[0m:\u001b[36mfrom_csv\u001b[0m:\u001b[36m293\u001b[0m - \u001b[1mReading grid from /home/smmsstau@ie3.e-technik.tu-dortmund.de/PycharmProjects/pypsdm/tests/resources/simbench/input\u001b[0m\n", |
| 31 | + "\u001b[32m2025-08-11 12:35:40.921\u001b[0m | \u001b[34m\u001b[1mDEBUG \u001b[0m | \u001b[36mpypsdm.models.primary_data\u001b[0m:\u001b[36mfrom_csv\u001b[0m:\u001b[36m273\u001b[0m - \u001b[34m\u001b[1mNo primary data in path /home/smmsstau@ie3.e-technik.tu-dortmund.de/PycharmProjects/pypsdm/tests/resources/simbench/input\u001b[0m\n", |
| 32 | + "\u001b[32m2025-08-11 12:35:40.922\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpypsdm.models.gwr\u001b[0m:\u001b[36mfrom_csv\u001b[0m:\u001b[36m305\u001b[0m - \u001b[1mReading results from /home/smmsstau@ie3.e-technik.tu-dortmund.de/PycharmProjects/pypsdm/tests/resources/simbench/results\u001b[0m\n", |
| 33 | + "\u001b[32m2025-08-11 12:35:41.784\u001b[0m | \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mpypsdm.models.result.participant.dict\u001b[0m:\u001b[36mfrom_csv\u001b[0m:\u001b[36m76\u001b[0m - \u001b[33m\u001b[1mEntity 557b9f51-d83c-476c-a84c-d240530c203d not in input entities\u001b[0m\n", |
| 34 | + "\u001b[32m2025-08-11 12:35:41.789\u001b[0m | \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mpypsdm.models.result.participant.dict\u001b[0m:\u001b[36mfrom_csv\u001b[0m:\u001b[36m76\u001b[0m - \u001b[33m\u001b[1mEntity 5d50a881-c383-463e-8355-41b3dd57422d not in input entities\u001b[0m\n" |
28 | 35 | ]
|
29 | 36 | }
|
30 | 37 | ],
|
|
7737 | 7744 | },
|
7738 | 7745 | {
|
7739 | 7746 | "cell_type": "code",
|
| 7747 | + "execution_count": 41, |
7740 | 7748 | "metadata": {
|
7741 | 7749 | "ExecuteTime": {
|
7742 | 7750 | "end_time": "2025-08-05T17:12:52.846724Z",
|
7743 | 7751 | "start_time": "2025-08-05T17:12:52.809506Z"
|
7744 | 7752 | }
|
7745 | 7753 | },
|
7746 |
| - "source": [ |
7747 |
| - "# NBVAL_IGNORE_OUTPUT\n", |
7748 |
| - "# Let's say you want to make sure that all the load is actually connected to the\n", |
7749 |
| - "# node that we have filtered for\n", |
7750 |
| - "load_uuids = list(nodal_gwr.loads.keys())\n", |
7751 |
| - "\n", |
7752 |
| - "# You can get a subset of the input data model via a list of uuids\n", |
7753 |
| - "# Note that the `node` attribute confirms that indeed the load is connected\n", |
7754 |
| - "# to the node we have filtered for\n", |
7755 |
| - "gwr.loads.subset(load_uuids[0]).data" |
7756 |
| - ], |
7757 | 7754 | "outputs": [
|
7758 | 7755 | {
|
7759 | 7756 | "data": {
|
7760 |
| - "text/plain": [ |
7761 |
| - " cos_phi_rated e_cons_annual \\\n", |
7762 |
| - "uuid \n", |
7763 |
| - "a0330517-9705-4d0a-bcaf-71f203cd6187 0.93 0.0 \n", |
7764 |
| - "\n", |
7765 |
| - " id \\\n", |
7766 |
| - "uuid \n", |
7767 |
| - "a0330517-9705-4d0a-bcaf-71f203cd6187 MV3.101 Load 61 \n", |
7768 |
| - "\n", |
7769 |
| - " load_profile \\\n", |
7770 |
| - "uuid \n", |
7771 |
| - "a0330517-9705-4d0a-bcaf-71f203cd6187 No load profile assigned \n", |
7772 |
| - "\n", |
7773 |
| - " node \\\n", |
7774 |
| - "uuid \n", |
7775 |
| - "a0330517-9705-4d0a-bcaf-71f203cd6187 090d13e8-3cce-4793-816f-4c50f23f3f7f \n", |
7776 |
| - "\n", |
7777 |
| - " operates_from operates_until operator \\\n", |
7778 |
| - "uuid \n", |
7779 |
| - "a0330517-9705-4d0a-bcaf-71f203cd6187 NaN NaN NaN \n", |
7780 |
| - "\n", |
7781 |
| - " q_characteristics s_rated \n", |
7782 |
| - "uuid \n", |
7783 |
| - "a0330517-9705-4d0a-bcaf-71f203cd6187 cosPhiFixed:{(0.0,0.93)} 668.0 " |
7784 |
| - ], |
7785 | 7757 | "text/html": [
|
7786 | 7758 | "<div>\n",
|
7787 | 7759 | "<style scoped>\n",
|
|
7843 | 7815 | " </tbody>\n",
|
7844 | 7816 | "</table>\n",
|
7845 | 7817 | "</div>"
|
| 7818 | + ], |
| 7819 | + "text/plain": [ |
| 7820 | + " cos_phi_rated e_cons_annual \\\n", |
| 7821 | + "uuid \n", |
| 7822 | + "a0330517-9705-4d0a-bcaf-71f203cd6187 0.93 0.0 \n", |
| 7823 | + "\n", |
| 7824 | + " id \\\n", |
| 7825 | + "uuid \n", |
| 7826 | + "a0330517-9705-4d0a-bcaf-71f203cd6187 MV3.101 Load 61 \n", |
| 7827 | + "\n", |
| 7828 | + " load_profile \\\n", |
| 7829 | + "uuid \n", |
| 7830 | + "a0330517-9705-4d0a-bcaf-71f203cd6187 No load profile assigned \n", |
| 7831 | + "\n", |
| 7832 | + " node \\\n", |
| 7833 | + "uuid \n", |
| 7834 | + "a0330517-9705-4d0a-bcaf-71f203cd6187 090d13e8-3cce-4793-816f-4c50f23f3f7f \n", |
| 7835 | + "\n", |
| 7836 | + " operates_from operates_until operator \\\n", |
| 7837 | + "uuid \n", |
| 7838 | + "a0330517-9705-4d0a-bcaf-71f203cd6187 NaN NaN NaN \n", |
| 7839 | + "\n", |
| 7840 | + " q_characteristics s_rated \n", |
| 7841 | + "uuid \n", |
| 7842 | + "a0330517-9705-4d0a-bcaf-71f203cd6187 cosPhiFixed:{(0.0,0.93)} 668.0 " |
7846 | 7843 | ]
|
7847 | 7844 | },
|
7848 | 7845 | "execution_count": 41,
|
7849 | 7846 | "metadata": {},
|
7850 | 7847 | "output_type": "execute_result"
|
7851 | 7848 | }
|
7852 | 7849 | ],
|
7853 |
| - "execution_count": 41 |
| 7850 | + "source": [ |
| 7851 | + "# NBVAL_IGNORE_OUTPUT\n", |
| 7852 | + "# Let's say you want to make sure that all the load is actually connected to the\n", |
| 7853 | + "# node that we have filtered for\n", |
| 7854 | + "load_uuids = list(nodal_gwr.loads.keys())\n", |
| 7855 | + "\n", |
| 7856 | + "# You can get a subset of the input data model via a list of uuids\n", |
| 7857 | + "# Note that the `node` attribute confirms that indeed the load is connected\n", |
| 7858 | + "# to the node we have filtered for\n", |
| 7859 | + "gwr.loads.subset(load_uuids[0]).data" |
| 7860 | + ] |
7854 | 7861 | },
|
7855 | 7862 | {
|
7856 | 7863 | "cell_type": "markdown",
|
|
7860 | 7867 | "\n",
|
7861 | 7868 | "Check out the `docs/nbs/plots.ipynb` notebook for some examples of the included plotting utilities\n"
|
7862 | 7869 | ]
|
| 7870 | + }, |
| 7871 | + { |
| 7872 | + "cell_type": "markdown", |
| 7873 | + "metadata": {}, |
| 7874 | + "source": [ |
| 7875 | + "## Congestion Results\n", |
| 7876 | + "\n", |
| 7877 | + "If we want to analyze congestions in the grid, we can run SIMONA with congestion detection. All congestion results are mapped uuid of the asset for which the congestion was detected. The type information (e.g.: node, line, ect.) specifies type of the asset that has a congestion.\n", |
| 7878 | + "\n", |
| 7879 | + "Each congestion contains the value that occurred and the limits for the asset (e.g.: voltage band, line current limit, etc.)." |
| 7880 | + ] |
| 7881 | + }, |
| 7882 | + { |
| 7883 | + "cell_type": "code", |
| 7884 | + "execution_count": 2, |
| 7885 | + "metadata": { |
| 7886 | + "ExecuteTime": { |
| 7887 | + "end_time": "2025-08-11T10:35:47.649212Z", |
| 7888 | + "start_time": "2025-08-11T10:35:47.631440Z" |
| 7889 | + } |
| 7890 | + }, |
| 7891 | + "outputs": [ |
| 7892 | + { |
| 7893 | + "data": { |
| 7894 | + "text/html": [ |
| 7895 | + "<div>\n", |
| 7896 | + "<style scoped>\n", |
| 7897 | + " .dataframe tbody tr th:only-of-type {\n", |
| 7898 | + " vertical-align: middle;\n", |
| 7899 | + " }\n", |
| 7900 | + "\n", |
| 7901 | + " .dataframe tbody tr th {\n", |
| 7902 | + " vertical-align: top;\n", |
| 7903 | + " }\n", |
| 7904 | + "\n", |
| 7905 | + " .dataframe thead th {\n", |
| 7906 | + " text-align: right;\n", |
| 7907 | + " }\n", |
| 7908 | + "</style>\n", |
| 7909 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 7910 | + " <thead>\n", |
| 7911 | + " <tr style=\"text-align: right;\">\n", |
| 7912 | + " <th></th>\n", |
| 7913 | + " <th>max</th>\n", |
| 7914 | + " <th>min</th>\n", |
| 7915 | + " <th>subgrid</th>\n", |
| 7916 | + " <th>type</th>\n", |
| 7917 | + " <th>value</th>\n", |
| 7918 | + " </tr>\n", |
| 7919 | + " <tr>\n", |
| 7920 | + " <th>time</th>\n", |
| 7921 | + " <th></th>\n", |
| 7922 | + " <th></th>\n", |
| 7923 | + " <th></th>\n", |
| 7924 | + " <th></th>\n", |
| 7925 | + " <th></th>\n", |
| 7926 | + " </tr>\n", |
| 7927 | + " </thead>\n", |
| 7928 | + " <tbody>\n", |
| 7929 | + " <tr>\n", |
| 7930 | + " <th>2016-01-02 02:00:00</th>\n", |
| 7931 | + " <td>103</td>\n", |
| 7932 | + " <td>97</td>\n", |
| 7933 | + " <td>135</td>\n", |
| 7934 | + " <td>node</td>\n", |
| 7935 | + " <td>103.222590</td>\n", |
| 7936 | + " </tr>\n", |
| 7937 | + " <tr>\n", |
| 7938 | + " <th>2016-01-04 10:00:00</th>\n", |
| 7939 | + " <td>103</td>\n", |
| 7940 | + " <td>97</td>\n", |
| 7941 | + " <td>135</td>\n", |
| 7942 | + " <td>node</td>\n", |
| 7943 | + " <td>103.257236</td>\n", |
| 7944 | + " </tr>\n", |
| 7945 | + " <tr>\n", |
| 7946 | + " <th>2016-01-04 11:00:00</th>\n", |
| 7947 | + " <td>103</td>\n", |
| 7948 | + " <td>97</td>\n", |
| 7949 | + " <td>135</td>\n", |
| 7950 | + " <td>node</td>\n", |
| 7951 | + " <td>103.308051</td>\n", |
| 7952 | + " </tr>\n", |
| 7953 | + " </tbody>\n", |
| 7954 | + "</table>\n", |
| 7955 | + "</div>" |
| 7956 | + ], |
| 7957 | + "text/plain": [ |
| 7958 | + " max min subgrid type value\n", |
| 7959 | + "time \n", |
| 7960 | + "2016-01-02 02:00:00 103 97 135 node 103.222590\n", |
| 7961 | + "2016-01-04 10:00:00 103 97 135 node 103.257236\n", |
| 7962 | + "2016-01-04 11:00:00 103 97 135 node 103.308051" |
| 7963 | + ] |
| 7964 | + }, |
| 7965 | + "execution_count": 2, |
| 7966 | + "metadata": {}, |
| 7967 | + "output_type": "execute_result" |
| 7968 | + } |
| 7969 | + ], |
| 7970 | + "source": [ |
| 7971 | + "# Congestion results are only provided for two nodes\n", |
| 7972 | + "node_with_congestions = [\n", |
| 7973 | + " \"5d50a881-c383-463e-8355-41b3dd57422d\",\n", |
| 7974 | + " \"557b9f51-d83c-476c-a84c-d240530c203d\",\n", |
| 7975 | + "]\n", |
| 7976 | + "\n", |
| 7977 | + "congestion_res_1 = gwr.congestions_res[node_with_congestions[0]]\n", |
| 7978 | + "congestion_res_2 = gwr.congestions_res[node_with_congestions[1]]\n", |
| 7979 | + "\n", |
| 7980 | + "congestion_res_1.data" |
| 7981 | + ] |
7863 | 7982 | }
|
7864 | 7983 | ],
|
7865 | 7984 | "metadata": {
|
|
0 commit comments