Skip to content

Commit 27b5ead

Browse files
committed
Add export in the cgmes notebook
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
1 parent 05a5922 commit 27b5ead

File tree

1 file changed

+285
-3
lines changed

1 file changed

+285
-3
lines changed

cgmes.ipynb

Lines changed: 285 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@
495495
"</svg>\n"
496496
],
497497
"text/plain": [
498-
"<pypowsybl.network.impl.svg.Svg at 0x7f97fd1c1e50>"
498+
"<pypowsybl.network.impl.svg.Svg at 0x7fbedb8f9490>"
499499
]
500500
},
501501
"execution_count": 4,
@@ -1075,7 +1075,7 @@
10751075
"</svg>\n"
10761076
],
10771077
"text/plain": [
1078-
"<pypowsybl.network.impl.svg.Svg at 0x7f97fd1d1520>"
1078+
"<pypowsybl.network.impl.svg.Svg at 0x7fbedb906280>"
10791079
]
10801080
},
10811081
"execution_count": 5,
@@ -2311,7 +2311,7 @@
23112311
"</svg>\n"
23122312
],
23132313
"text/plain": [
2314-
"<pypowsybl.network.impl.svg.Svg at 0x7f97fc094e50>"
2314+
"<pypowsybl.network.impl.svg.Svg at 0x7fbed9fb6310>"
23152315
]
23162316
},
23172317
"execution_count": 12,
@@ -3829,6 +3829,288 @@
38293829
"results = sa.run(eu)\n",
38303830
"results.get_branch_flows_sensitivity_matrix()"
38313831
]
3832+
},
3833+
{
3834+
"cell_type": "markdown",
3835+
"metadata": {},
3836+
"source": [
3837+
"CGMES full export"
3838+
]
3839+
},
3840+
{
3841+
"cell_type": "code",
3842+
"execution_count": 25,
3843+
"metadata": {},
3844+
"outputs": [],
3845+
"source": [
3846+
"eu.save(\"./eu\", \"CGMES\")"
3847+
]
3848+
},
3849+
{
3850+
"cell_type": "markdown",
3851+
"metadata": {},
3852+
"source": [
3853+
"Export only the SV"
3854+
]
3855+
},
3856+
{
3857+
"cell_type": "code",
3858+
"execution_count": 26,
3859+
"metadata": {},
3860+
"outputs": [],
3861+
"source": [
3862+
"eu.save(\"/home/piloquetcol/test/eu_test\", \"CGMES\", parameters={'iidm.export.cgmes.profiles': 'SV'})"
3863+
]
3864+
},
3865+
{
3866+
"cell_type": "markdown",
3867+
"metadata": {},
3868+
"source": [
3869+
"For information, the export parameters for the CGMES format"
3870+
]
3871+
},
3872+
{
3873+
"cell_type": "code",
3874+
"execution_count": 27,
3875+
"metadata": {},
3876+
"outputs": [
3877+
{
3878+
"data": {
3879+
"text/html": [
3880+
"<div>\n",
3881+
"<style scoped>\n",
3882+
" .dataframe tbody tr th:only-of-type {\n",
3883+
" vertical-align: middle;\n",
3884+
" }\n",
3885+
"\n",
3886+
" .dataframe tbody tr th {\n",
3887+
" vertical-align: top;\n",
3888+
" }\n",
3889+
"\n",
3890+
" .dataframe thead th {\n",
3891+
" text-align: right;\n",
3892+
" }\n",
3893+
"</style>\n",
3894+
"<table border=\"1\" class=\"dataframe\">\n",
3895+
" <thead>\n",
3896+
" <tr style=\"text-align: right;\">\n",
3897+
" <th></th>\n",
3898+
" <th>description</th>\n",
3899+
" <th>type</th>\n",
3900+
" <th>default</th>\n",
3901+
" <th>possible_values</th>\n",
3902+
" </tr>\n",
3903+
" <tr>\n",
3904+
" <th>name</th>\n",
3905+
" <th></th>\n",
3906+
" <th></th>\n",
3907+
" <th></th>\n",
3908+
" <th></th>\n",
3909+
" </tr>\n",
3910+
" </thead>\n",
3911+
" <tbody>\n",
3912+
" <tr>\n",
3913+
" <th>iidm.export.cgmes.base-name</th>\n",
3914+
" <td>Basename for output files</td>\n",
3915+
" <td>STRING</td>\n",
3916+
" <td></td>\n",
3917+
" <td></td>\n",
3918+
" </tr>\n",
3919+
" <tr>\n",
3920+
" <th>iidm.export.cgmes.cim-version</th>\n",
3921+
" <td>CIM version to export</td>\n",
3922+
" <td>STRING</td>\n",
3923+
" <td></td>\n",
3924+
" <td>[14, 16, 100]</td>\n",
3925+
" </tr>\n",
3926+
" <tr>\n",
3927+
" <th>iidm.export.cgmes.export-boundary-power-flows</th>\n",
3928+
" <td>Export boundaries' power flows</td>\n",
3929+
" <td>BOOLEAN</td>\n",
3930+
" <td>true</td>\n",
3931+
" <td></td>\n",
3932+
" </tr>\n",
3933+
" <tr>\n",
3934+
" <th>iidm.export.cgmes.export-power-flows-for-switches</th>\n",
3935+
" <td>Export power flows for switches</td>\n",
3936+
" <td>BOOLEAN</td>\n",
3937+
" <td>true</td>\n",
3938+
" <td></td>\n",
3939+
" </tr>\n",
3940+
" <tr>\n",
3941+
" <th>iidm.export.cgmes.naming-strategy</th>\n",
3942+
" <td>Configure what type of naming strategy you want</td>\n",
3943+
" <td>STRING</td>\n",
3944+
" <td>identity</td>\n",
3945+
" <td>[identity, cgmes, cgmes-fix-all-invalid-ids]</td>\n",
3946+
" </tr>\n",
3947+
" <tr>\n",
3948+
" <th>iidm.export.cgmes.profiles</th>\n",
3949+
" <td>Profiles to export</td>\n",
3950+
" <td>STRING_LIST</td>\n",
3951+
" <td>[EQ, TP, SSH, SV]</td>\n",
3952+
" <td>[EQ, TP, SSH, SV]</td>\n",
3953+
" </tr>\n",
3954+
" <tr>\n",
3955+
" <th>iidm.export.cgmes.boundary-EQ-identifier</th>\n",
3956+
" <td>Boundary EQ model identifier</td>\n",
3957+
" <td>STRING</td>\n",
3958+
" <td></td>\n",
3959+
" <td></td>\n",
3960+
" </tr>\n",
3961+
" <tr>\n",
3962+
" <th>iidm.export.cgmes.boundary-TP-identifier</th>\n",
3963+
" <td>Boundary TP model identifier</td>\n",
3964+
" <td>STRING</td>\n",
3965+
" <td></td>\n",
3966+
" <td></td>\n",
3967+
" </tr>\n",
3968+
" <tr>\n",
3969+
" <th>iidm.export.cgmes.modeling-authority-set</th>\n",
3970+
" <td>Modeling authority set</td>\n",
3971+
" <td>STRING</td>\n",
3972+
" <td>powsybl.org</td>\n",
3973+
" <td></td>\n",
3974+
" </tr>\n",
3975+
" <tr>\n",
3976+
" <th>iidm.export.cgmes.model-description</th>\n",
3977+
" <td>Model description</td>\n",
3978+
" <td>STRING</td>\n",
3979+
" <td></td>\n",
3980+
" <td></td>\n",
3981+
" </tr>\n",
3982+
" <tr>\n",
3983+
" <th>iidm.export.cgmes.export-transformers-with-highest-voltage-at-end1</th>\n",
3984+
" <td>Export transformers with highest voltage at end1</td>\n",
3985+
" <td>BOOLEAN</td>\n",
3986+
" <td>false</td>\n",
3987+
" <td></td>\n",
3988+
" </tr>\n",
3989+
" <tr>\n",
3990+
" <th>iidm.export.cgmes.sourcing-actor</th>\n",
3991+
" <td>Sourcing actor name (for CGM business processes)</td>\n",
3992+
" <td>STRING</td>\n",
3993+
" <td></td>\n",
3994+
" <td></td>\n",
3995+
" </tr>\n",
3996+
" <tr>\n",
3997+
" <th>iidm.export.cgmes.export-load-flow-status</th>\n",
3998+
" <td>Export load flow status of topological islands</td>\n",
3999+
" <td>BOOLEAN</td>\n",
4000+
" <td>true</td>\n",
4001+
" <td></td>\n",
4002+
" </tr>\n",
4003+
" <tr>\n",
4004+
" <th>iidm.export.cgmes.max-p-mismatch-converged</th>\n",
4005+
" <td>Max mismatch in active power to consider a bus...</td>\n",
4006+
" <td>DOUBLE</td>\n",
4007+
" <td>0.1</td>\n",
4008+
" <td></td>\n",
4009+
" </tr>\n",
4010+
" <tr>\n",
4011+
" <th>iidm.export.cgmes.max-q-mismatch-converged</th>\n",
4012+
" <td>Max mismatch in reactive power to consider a b...</td>\n",
4013+
" <td>DOUBLE</td>\n",
4014+
" <td>0.1</td>\n",
4015+
" <td></td>\n",
4016+
" </tr>\n",
4017+
" <tr>\n",
4018+
" <th>iidm.export.cgmes.export-sv-injections-for-slacks</th>\n",
4019+
" <td>Export SvInjections with the mismatch of slack...</td>\n",
4020+
" <td>BOOLEAN</td>\n",
4021+
" <td>true</td>\n",
4022+
" <td></td>\n",
4023+
" </tr>\n",
4024+
" </tbody>\n",
4025+
"</table>\n",
4026+
"</div>"
4027+
],
4028+
"text/plain": [
4029+
" description \\\n",
4030+
"name \n",
4031+
"iidm.export.cgmes.base-name Basename for output files \n",
4032+
"iidm.export.cgmes.cim-version CIM version to export \n",
4033+
"iidm.export.cgmes.export-boundary-power-flows Export boundaries' power flows \n",
4034+
"iidm.export.cgmes.export-power-flows-for-switches Export power flows for switches \n",
4035+
"iidm.export.cgmes.naming-strategy Configure what type of naming strategy you want \n",
4036+
"iidm.export.cgmes.profiles Profiles to export \n",
4037+
"iidm.export.cgmes.boundary-EQ-identifier Boundary EQ model identifier \n",
4038+
"iidm.export.cgmes.boundary-TP-identifier Boundary TP model identifier \n",
4039+
"iidm.export.cgmes.modeling-authority-set Modeling authority set \n",
4040+
"iidm.export.cgmes.model-description Model description \n",
4041+
"iidm.export.cgmes.export-transformers-with-high... Export transformers with highest voltage at end1 \n",
4042+
"iidm.export.cgmes.sourcing-actor Sourcing actor name (for CGM business processes) \n",
4043+
"iidm.export.cgmes.export-load-flow-status Export load flow status of topological islands \n",
4044+
"iidm.export.cgmes.max-p-mismatch-converged Max mismatch in active power to consider a bus... \n",
4045+
"iidm.export.cgmes.max-q-mismatch-converged Max mismatch in reactive power to consider a b... \n",
4046+
"iidm.export.cgmes.export-sv-injections-for-slacks Export SvInjections with the mismatch of slack... \n",
4047+
"\n",
4048+
" type \\\n",
4049+
"name \n",
4050+
"iidm.export.cgmes.base-name STRING \n",
4051+
"iidm.export.cgmes.cim-version STRING \n",
4052+
"iidm.export.cgmes.export-boundary-power-flows BOOLEAN \n",
4053+
"iidm.export.cgmes.export-power-flows-for-switches BOOLEAN \n",
4054+
"iidm.export.cgmes.naming-strategy STRING \n",
4055+
"iidm.export.cgmes.profiles STRING_LIST \n",
4056+
"iidm.export.cgmes.boundary-EQ-identifier STRING \n",
4057+
"iidm.export.cgmes.boundary-TP-identifier STRING \n",
4058+
"iidm.export.cgmes.modeling-authority-set STRING \n",
4059+
"iidm.export.cgmes.model-description STRING \n",
4060+
"iidm.export.cgmes.export-transformers-with-high... BOOLEAN \n",
4061+
"iidm.export.cgmes.sourcing-actor STRING \n",
4062+
"iidm.export.cgmes.export-load-flow-status BOOLEAN \n",
4063+
"iidm.export.cgmes.max-p-mismatch-converged DOUBLE \n",
4064+
"iidm.export.cgmes.max-q-mismatch-converged DOUBLE \n",
4065+
"iidm.export.cgmes.export-sv-injections-for-slacks BOOLEAN \n",
4066+
"\n",
4067+
" default \\\n",
4068+
"name \n",
4069+
"iidm.export.cgmes.base-name \n",
4070+
"iidm.export.cgmes.cim-version \n",
4071+
"iidm.export.cgmes.export-boundary-power-flows true \n",
4072+
"iidm.export.cgmes.export-power-flows-for-switches true \n",
4073+
"iidm.export.cgmes.naming-strategy identity \n",
4074+
"iidm.export.cgmes.profiles [EQ, TP, SSH, SV] \n",
4075+
"iidm.export.cgmes.boundary-EQ-identifier \n",
4076+
"iidm.export.cgmes.boundary-TP-identifier \n",
4077+
"iidm.export.cgmes.modeling-authority-set powsybl.org \n",
4078+
"iidm.export.cgmes.model-description \n",
4079+
"iidm.export.cgmes.export-transformers-with-high... false \n",
4080+
"iidm.export.cgmes.sourcing-actor \n",
4081+
"iidm.export.cgmes.export-load-flow-status true \n",
4082+
"iidm.export.cgmes.max-p-mismatch-converged 0.1 \n",
4083+
"iidm.export.cgmes.max-q-mismatch-converged 0.1 \n",
4084+
"iidm.export.cgmes.export-sv-injections-for-slacks true \n",
4085+
"\n",
4086+
" possible_values \n",
4087+
"name \n",
4088+
"iidm.export.cgmes.base-name \n",
4089+
"iidm.export.cgmes.cim-version [14, 16, 100] \n",
4090+
"iidm.export.cgmes.export-boundary-power-flows \n",
4091+
"iidm.export.cgmes.export-power-flows-for-switches \n",
4092+
"iidm.export.cgmes.naming-strategy [identity, cgmes, cgmes-fix-all-invalid-ids] \n",
4093+
"iidm.export.cgmes.profiles [EQ, TP, SSH, SV] \n",
4094+
"iidm.export.cgmes.boundary-EQ-identifier \n",
4095+
"iidm.export.cgmes.boundary-TP-identifier \n",
4096+
"iidm.export.cgmes.modeling-authority-set \n",
4097+
"iidm.export.cgmes.model-description \n",
4098+
"iidm.export.cgmes.export-transformers-with-high... \n",
4099+
"iidm.export.cgmes.sourcing-actor \n",
4100+
"iidm.export.cgmes.export-load-flow-status \n",
4101+
"iidm.export.cgmes.max-p-mismatch-converged \n",
4102+
"iidm.export.cgmes.max-q-mismatch-converged \n",
4103+
"iidm.export.cgmes.export-sv-injections-for-slacks "
4104+
]
4105+
},
4106+
"execution_count": 27,
4107+
"metadata": {},
4108+
"output_type": "execute_result"
4109+
}
4110+
],
4111+
"source": [
4112+
"pp.network.get_export_parameters(\"CGMES\")"
4113+
]
38324114
}
38334115
],
38344116
"metadata": {

0 commit comments

Comments
 (0)