Skip to content

Commit

Permalink
v1.6.0. Release with tested VSC HVDC model. stepspy also updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
changgang committed Apr 13, 2022
1 parent acf3095 commit 139193a
Show file tree
Hide file tree
Showing 4 changed files with 471 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* STEPS: https://github.com/changgang/steps and https://gitee.com/lichgang/steps/
* stepspy: https://pypi.org/project/stepspy/
* Documentation: https://github.com/changgang/steps/wiki/
- Date of Readme: Feb 2, 2022
- Date of Readme: April 13, 2022

# Reference
Please cite STEPS with the following paper:
Expand All @@ -19,6 +19,7 @@ Though BPA dat format is supported, it will be supported in the future version i
You are encouraged to join us for further development.

## Major versions
- v1.6.0. Add VSC HVDC for powerflow and dynamic simulation. stepspy also updated. Released on April 13, 2022.
- v1.5.4. Update to improve performance. Released on Oct. 20, 2021.
- v1.5.2. Add new APIs to get generator related model internal variables. Start to add linearization codes. Released on March. 24, 2021.
- v1.5.1. Add new option export_full to functions of save_network_Y_matrix and APIs. stepspy is also updated. Start to add sequential parameters to STEPS. Released on Feb. 2, 2021.
Expand Down
2 changes: 1 addition & 1 deletion python/stepspy-current/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="stepspy",
version="1.5.3.1",
version="1.6.0",
author="Changgang Li",
author_email="[email protected]",
description="Python module of Simulation Toolkit for Electrical Power Systems",
Expand Down
50 changes: 50 additions & 0 deletions python/stepspy-current/stepspy/libsteps/pylibsteps.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,17 @@ def load_library():

libsteps.api_load_powerflow_data_from_file.restype = None
libsteps.api_load_powerflow_data_from_file.argtypes = (c_char_p, c_char_p, c_uint)
libsteps.api_load_vsc_hvdc_powerflow_data_from_file.restype = None
libsteps.api_load_vsc_hvdc_powerflow_data_from_file.argtypes = (c_char_p, c_char_p, c_uint)
libsteps.api_load_powerflow_result_from_file.restype = None
libsteps.api_load_powerflow_result_from_file.argtypes = (c_char_p, c_char_p, c_uint)
libsteps.api_load_dynamic_data_from_file.restype = None
libsteps.api_load_dynamic_data_from_file.argtypes = (c_char_p, c_char_p, c_uint)

libsteps.api_save_powerflow_data_to_file.restype = None
libsteps.api_save_powerflow_data_to_file.argtypes = (c_char_p, c_char_p, c_bool, c_bool, c_bool, c_uint, c_uint)
libsteps.api_save_vsc_hvdc_powerflow_data_to_file.restype = None
libsteps.api_save_vsc_hvdc_powerflow_data_to_file.argtypes = (c_char_p, c_char_p, c_bool, c_bool, c_bool, c_uint, c_uint)
libsteps.api_save_dynamic_data_to_file.restype = None
libsteps.api_save_dynamic_data_to_file.argtypes = (c_char_p, c_char_p, c_bool, c_uint)

Expand Down Expand Up @@ -195,6 +199,8 @@ def load_library():
libsteps.api_is_transformer_exist.argtypes = (c_uint, c_uint, c_uint, c_char_p, c_uint)
libsteps.api_is_hvdc_exist.restype = c_bool
libsteps.api_is_hvdc_exist.argtypes = (c_uint, c_uint, c_char_p, c_uint)
libsteps.api_is_vsc_hvdc_exist.restype = c_bool
libsteps.api_is_vsc_hvdc_exist.argtypes = (c_char_p, c_uint)
libsteps.api_is_equivalent_device_exist.restype = c_bool
libsteps.api_is_equivalent_device_exist.argtypes = (c_uint, c_char_p, c_uint)

Expand Down Expand Up @@ -274,6 +280,8 @@ def load_library():
libsteps.api_add_line.argtypes = (c_uint, c_uint, c_char_p, c_uint)
libsteps.api_add_hvdc.restype = None
libsteps.api_add_hvdc.argtypes = (c_uint, c_uint, c_char_p, c_uint)
libsteps.api_add_vsc_hvdc.restype = None
libsteps.api_add_vsc_hvdc.argtypes = (c_char_p, c_uint)
libsteps.api_add_transformer.restype = None
libsteps.api_add_transformer.argtypes = (c_uint, c_uint, c_uint, c_char_p, c_uint)
libsteps.api_add_equivalent_device.restype = None
Expand Down Expand Up @@ -303,6 +311,8 @@ def load_library():
libsteps.api_remove_line.argtypes = (c_uint, c_uint, c_char_p, c_uint)
libsteps.api_remove_hvdc.restype = None
libsteps.api_remove_hvdc.argtypes = (c_uint, c_uint, c_char_p, c_uint)
libsteps.api_remove_vsc_hvdc.restype = None
libsteps.api_remove_vsc_hvdc.argtypes = (c_char_p, c_uint)
libsteps.api_remove_transformer.restype = None
libsteps.api_remove_transformer.argtypes = (c_uint, c_uint, c_uint, c_char_p, c_uint)
libsteps.api_remove_equivalent_device.restype = None
Expand Down Expand Up @@ -436,6 +446,23 @@ def load_library():
libsteps.api_set_hvdc_boolean_data.restype = None
libsteps.api_set_hvdc_boolean_data.argtypes = (c_uint, c_uint, c_char_p, c_char_p, c_char_p, c_bool, c_uint)

libsteps.api_get_vsc_hvdc_integer_data.restype = (c_int)
libsteps.api_get_vsc_hvdc_integer_data.argtypes = (c_char_p, c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_get_vsc_hvdc_float_data.restype = (c_double)
libsteps.api_get_vsc_hvdc_float_data.argtypes = (c_char_p, c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_get_vsc_hvdc_string_data.restype = (c_char_p)
libsteps.api_get_vsc_hvdc_string_data.argtypes = (c_char_p, c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_get_vsc_hvdc_boolean_data.restype = (c_bool)
libsteps.api_get_vsc_hvdc_boolean_data.argtypes = (c_char_p, c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_set_vsc_hvdc_integer_data.restype = None
libsteps.api_set_vsc_hvdc_integer_data.argtypes = (c_char_p, c_char_p, c_char_p, c_int, c_uint, c_uint)
libsteps.api_set_vsc_hvdc_float_data.restype = None
libsteps.api_set_vsc_hvdc_float_data.argtypes = (c_char_p, c_char_p, c_char_p, c_double, c_uint, c_uint)
libsteps.api_set_vsc_hvdc_string_data.restype = None
libsteps.api_set_vsc_hvdc_string_data.argtypes = (c_char_p, c_char_p, c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_set_vsc_hvdc_boolean_data.restype = None
libsteps.api_set_vsc_hvdc_boolean_data.argtypes = (c_char_p, c_char_p, c_char_p, c_bool, c_uint, c_uint)

libsteps.api_get_area_integer_data.restype = (c_int)
libsteps.api_get_area_integer_data.argtypes = (c_uint, c_char_p, c_uint)
libsteps.api_get_area_float_data.restype = (c_double)
Expand Down Expand Up @@ -550,6 +577,16 @@ def load_library():
libsteps.api_get_hvdc_related_model_float_parameter_name.restype = c_char_p
libsteps.api_get_hvdc_related_model_float_parameter_name.argtypes = (c_uint, c_uint, c_char_p, c_char_p, c_uint, c_uint)

libsteps.api_get_vsc_hvdc_related_model_name.restype = c_char_p
libsteps.api_get_vsc_hvdc_related_model_name.argtypes = (c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_get_vsc_hvdc_related_model_float_parameter.restype = c_double
libsteps.api_get_vsc_hvdc_related_model_float_parameter.argtypes = (c_char_p, c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_set_vsc_hvdc_related_model_float_parameter.restype = None
libsteps.api_set_vsc_hvdc_related_model_float_parameter.argtypes = (c_char_p, c_char_p, c_char_p, c_double, c_uint, c_uint)
libsteps.api_get_vsc_hvdc_related_model_float_parameter_count.restype = c_uint
libsteps.api_get_vsc_hvdc_related_model_float_parameter_count.argtypes = (c_char_p, c_char_p, c_uint, c_uint)
libsteps.api_get_vsc_hvdc_related_model_float_parameter_name.restype = c_char_p
libsteps.api_get_vsc_hvdc_related_model_float_parameter_name.argtypes = (c_char_p, c_char_p, c_uint, c_uint, c_uint)

libsteps.api_get_powerflow_solver_integer_parameter.restype = (c_uint)
libsteps.api_get_powerflow_solver_integer_parameter.argtypes = (c_char_p, c_uint)
Expand Down Expand Up @@ -654,6 +691,8 @@ def load_library():
libsteps.api_prepare_transformer_related_meters.argtypes = (c_uint, )
libsteps.api_prepare_hvdc_related_meters.restype = None
libsteps.api_prepare_hvdc_related_meters.argtypes = (c_uint, )
libsteps.api_prepare_vsc_hvdc_related_meters.restype = None
libsteps.api_prepare_vsc_hvdc_related_meters.argtypes = (c_uint, )
libsteps.api_prepare_equivalent_device_related_meters.restype = None
libsteps.api_prepare_equivalent_device_related_meters.argtypes = (c_uint, )

Expand All @@ -676,6 +715,8 @@ def load_library():
libsteps.api_prepare_transformer_related_meter.argtypes = (c_uint, c_uint, c_uint, c_char_p, c_char_p, c_char_p, c_char_p, c_uint)
libsteps.api_prepare_hvdc_related_meter.restype = None
libsteps.api_prepare_hvdc_related_meter.argtypes = (c_uint, c_uint, c_char_p, c_char_p, c_char_p, c_char_p, c_uint)
libsteps.api_prepare_vsc_hvdc_related_meter.restype = None
libsteps.api_prepare_vsc_hvdc_related_meter.argtypes = (c_char_p, c_char_p, c_uint,c_char_p, c_uint)
libsteps.api_prepare_equivalent_device_related_meter.restype = None
libsteps.api_prepare_equivalent_device_related_meter.argtypes = (c_uint, c_char_p, c_char_p, c_char_p, c_uint)

Expand Down Expand Up @@ -792,6 +833,15 @@ def load_library():
libsteps.api_set_hvdc_power_order_in_MW.restype = None
libsteps.api_set_hvdc_power_order_in_MW.argtypes = (c_uint, c_uint, c_char_p, c_double, c_uint)

libsteps.api_set_vsc_hvdc_dc_line_fault.restype = None
libsteps.api_set_vsc_hvdc_dc_line_fault.argtypes = (c_char_p, c_uint, c_uint, c_char_p, c_double,c_double, c_uint)
libsteps.api_clear_vsc_hvdc_dc_line_fault.restype = None
libsteps.api_clear_vsc_hvdc_dc_line_fault.argtypes = (c_char_p, c_uint, c_uint, c_char_p, c_uint)
libsteps.api_trip_vsc_hvdc_dc_line.restype = None
libsteps.api_trip_vsc_hvdc_dc_line.argtypes = (c_char_p, c_uint, c_uint, c_char_p, c_uint)
libsteps.api_close_vsc_hvdc_dc_line.restype = None
libsteps.api_close_vsc_hvdc_dc_line.argtypes = (c_char_p, c_uint, c_uint, c_char_p, c_uint)

libsteps.api_search_cct.restype = (c_double)
libsteps.api_search_cct.argtypes = (c_char_p, c_char_p, c_uint, c_uint, c_char_p, c_uint, c_uint, c_uint)

Expand Down
Loading

0 comments on commit 139193a

Please sign in to comment.