Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
changgang committed Mar 9, 2021
1 parent 0936eda commit fdd39b3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Simulation Toolkit for Electrical Power Systems
- Maintainer: Changgang Li <[email protected]> from School of Electrical Engineering, Shandong University.
- Documentation: https://github.com/changgang/steps/wiki/
- Date of Readme: Feb. 5, 2021
- Trust the following pages or other credible duplications:
* STEPS: https://github.com/changgang/steps
* stepspy: https://pypi.org/project/stepspy/
* Documentation: https://github.com/changgang/steps/wiki/
- Date of Readme: March 9, 2021

# Reference
Please cite STEPS with the following paper:
Expand Down
56 changes: 28 additions & 28 deletions python/stepspy-current/stepspy/stepspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,20 @@ def get_pv_unit_capacity(self):
global STEPS_LIB
device = self.__get_c_char_p_of_string("PV Unit")
return int(STEPS_LIB.api_get_device_capacity(device, self.toolkit_index))


def get_energy_storage_capacity(self):
"""
Get capacity for storing energy storages in database.
Args: N/A
Rets:
(1) Maximum number of energy storages that can be stored in the database.
Example:
nstorage_max = simulator.get_energy_storage_capacity()
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Energy Storage")
return int(STEPS_LIB.api_get_device_capacity(device, self.toolkit_index))

def get_load_capacity(self):
"""
Get capacity for storing loads in database.
Expand Down Expand Up @@ -534,19 +547,6 @@ def get_equivalent_device_capacity(self):
device = self.__get_c_char_p_of_string("Equivalent Device")
return int(STEPS_LIB.api_get_device_capacity(device, self.toolkit_index))

def get_energy_storage_capacity(self):
"""
Get capacity for storing energy storages in database.
Args: N/A
Rets:
(1) Maximum number of energy storages that can be stored in the database.
Example:
nstorage_max = simulator.get_energy_storage_capacity()
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Energy Storage")
return int(STEPS_LIB.api_get_device_capacity(device, self.toolkit_index))

def get_area_capacity(self):
"""
Get capacity for storing areas in database.
Expand Down Expand Up @@ -639,6 +639,20 @@ def set_pv_unit_capacity(self, capacity):
device = self.__get_c_char_p_of_string("PV Unit")
return STEPS_LIB.api_set_device_capacity(device, capacity, self.toolkit_index)

def set_energy_storage_capacity(self, capacity):
"""
Set capacity for storing energy storages in database.
Args:
(1) capacity: Maximum number of energy storages that can be stored in the database.
Rets: N/A
Tips:
This function SHOULD be called before adding devices to the database.
Example: N/A
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Energy Storage")
return STEPS_LIB.api_set_device_capacity(device, capacity, self.toolkit_index)

def set_load_capacity(self, capacity):
"""
Set capacity for storing loads in database.
Expand Down Expand Up @@ -723,20 +737,6 @@ def set_equivalent_device_capacity(self, capacity):
device = self.__get_c_char_p_of_string("Equivalent Device")
return STEPS_LIB.api_set_device_capacity(device, capacity, self.toolkit_index)

def set_energy_storage_capacity(self, capacity):
"""
Set capacity for storing energy storages in database.
Args:
(1) capacity: Maximum number of energy storages that can be stored in the database.
Rets: N/A
Tips:
This function SHOULD be called before adding devices to the database.
Example: N/A
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Energy Storage")
return STEPS_LIB.api_set_device_capacity(device, capacity, self.toolkit_index)

def set_area_capacity(self, capacity):
"""
Set capacity for storing areas in database.
Expand Down

0 comments on commit fdd39b3

Please sign in to comment.