Skip to content

Commit 6a5fd2d

Browse files
committed
update core docstrings
1 parent d9309ef commit 6a5fd2d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pygridsim/core.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,8 @@ def update_source(self, source_type: str = "turbine", params = {}):
4242
Adds a main voltage source if it doesn't exist, otherwise edits it
4343
4444
Args:
45-
params: load parameters for these manual additions
4645
source_type: source type as a string
47-
num (optional): number of sources to create with these parameters (removed for now)
48-
(removed) num_in_batch: how many to batch together directly (so they can't be connected to lines separately, etc.
49-
most common use case is if a house has 20 solar panels it's more useful to group them together)
46+
params: load parameters for these manual additions
5047
Return:
5148
List of source_nodes
5249
"""
@@ -96,6 +93,8 @@ def add_lines(self, connections: list[tuple], line_type: str = "lv", params = {}
9693
Args:
9794
connections: a list of new connections to add. Each item of the list follows the form (source1, load1)
9895
line_type: a string representing linetype if user wants to use preset parameters
96+
params: any custom parameters for lines or transformers
97+
transformer: whether or not to include a transformer, default yes
9998
"""
10099
for src, dst in connections:
101100
make_line(src, dst, line_type, self.num_lines, params, transformer)
@@ -110,8 +109,11 @@ def solve(self):
110109
def results(self, queries: list[str], export_path = ""):
111110
"""
112111
Allow the user to query for many results at once instead of learning how to manually query
113-
114-
Returns:
112+
113+
Args:
114+
queries: List of queries to fetch the result of
115+
export_path: if specified, exports result to this string
116+
Return:
115117
Results for each query, in a dictionary
116118
"""
117119
results = {}

0 commit comments

Comments
 (0)