powerworld-tp-tools 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
powerworld_tplan_tools/__init__.py,sha256=gnvFhSsamEL7j-mWOFErNs1YTAjbu4O4JzOjumhliUU,23
|
|
2
|
+
powerworld_tplan_tools/branches.py,sha256=cJ3BCv3nUPlx2nKInyfiBXP7c9-GGdQm_3Mbyltnn5Y,518
|
|
3
|
+
powerworld_tp_tools-0.0.1.dist-info/METADATA,sha256=Wraf6WOf14V6zD3zRLumLnu9VCjOC2YLT4hmqts2a6M,212
|
|
4
|
+
powerworld_tp_tools-0.0.1.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
5
|
+
powerworld_tp_tools-0.0.1.dist-info/top_level.txt,sha256=RYKRJ9H1OzXALxThBK1sS071BBzrqM9sAyICDmKvCOg,23
|
|
6
|
+
powerworld_tp_tools-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
powerworld_tplan_tools
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .branches import *
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from esa import SAW
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# Function to add a branch to the case
|
|
5
|
+
def add_line_to_case(saw, updated_branch_fields, branch_value_list):
|
|
6
|
+
saw.RunScriptCommand("EnterMode(EDIT);") # Set to edit mode
|
|
7
|
+
updated_branch_value_list = "[" + ", ".join(f'"{item}"' if isinstance(item, str) else str(item) for item in branch_value_list) + "]"
|
|
8
|
+
branch_command_string = f'CreateData("Branch", {updated_branch_fields}, {updated_branch_value_list});'
|
|
9
|
+
saw.RunScriptCommand(branch_command_string) # add line to case
|
|
10
|
+
|