-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn user with DeprecationWarning
too avoid using deprecated functions
#823
Comments
get_reference_voltages
in sensitivity analysisget_reference_voltages
in sensitivity analysis
Just tested what happens if you ask for voltage sensitivities. The same happens, but now the values for import pypowsybl
BUSES_OF_INTEREST = [
"VL1_0",
"VL2_0",
"VL3_0",
"VL13_0",
"VL14_0",
]
GENS_OF_INTEREST = [
"B1-G",
"B3-G",
"B8-G",
]
net = pypowsybl.network.create_ieee14()
pypowsybl.loadflow.run_ac(net)
analysis = pypowsybl.sensitivity.create_ac_analysis()
analysis.add_bus_voltage_factor_matrix(
bus_ids=BUSES_OF_INTEREST,
target_voltage_ids=GENS_OF_INTEREST,
)
result = analysis.run(net)
flows = result.get_reference_flows()
voltages = result.get_reference_voltages()
sens = result.get_sensitivity_matrix()
print("\nFLOWS\n", flows)
print("\nVOLTAGES\n", voltages)
print("\nSENSITIVITY\n", sens)
# FLOWS
# VL1_0 VL2_0 VL3_0 VL13_0 VL14_0
# reference_flows 143.1 141.075 136.35 12.604581 12.426359
#
# VOLTAGES
# VL1_0 VL2_0 VL3_0 VL13_0 VL14_0
# reference_voltages 143.1 141.075 136.35 12.604581 12.426359
#
# SENSITIVITY
# VL1_0 VL2_0 VL3_0 VL13_0 VL14_0
# B1-G 1.0 0.0 0.0 0.000712 0.003062
# B3-G 0.0 0.0 1.0 0.001353 0.005884
# B8-G 0.0 0.0 0.0 0.028720 0.124654 |
I just saw in the depths of the documentation that |
get_reference_voltages
in sensitivity analysisDeprecationWarning
too avoid using deprecated functions
Hello, I don't understand why you don't get the deprecation warnings as they are already in the code. Thanks for pointing it out, I will look into it. |
Describe the current behavior
When running the following, the values of
get_reference_voltages
andget_reference_flows
are the same:Describe the expected behavior
First of all, let's address the elephant in the room. It doesn't make sense to ask for the reference voltages when looking for branch flow sensitivities. Nevertheless, I am of the opinion that the output of
get_reference_voltages
is incorrect, because the values for the reference voltage are definitely wrong.What I would expect is that an empty DataFrame is returned or an exception is raised.
Describe the steps
No response
Environment
pypowsybl version is
1.7.0.dev1
on commit 984e527Relevant Log Output
No response
Extra Information
No response
The text was updated successfully, but these errors were encountered: