MCPcopy Create free account

hub / github.com/PowerGridModel/power-grid-model-ds / functions

Functions625 in github.com/PowerGridModel/power-grid-model-ds

↓ 2 callersMethodrun
Generate nodes in a grid which are sources (substations)
src/power_grid_model_ds/_core/data_source/generator/arrays/source.py:17
↓ 2 callersFunctionsave_to_pickle
Save a python object to pickle
src/power_grid_model_ds/_core/utils/pickle.py:13
↓ 2 callersFunctionsearch_element
Color the specified element red based on the input values.
src/power_grid_model_ds/_core/visualizer/callbacks/search_form.py:19
↓ 2 callersFunctionupdate_by_id
Update values in an array by id Args: array: the array to update ids: the ids to update allow_missing: whether to allow i
src/power_grid_model_ds/_core/model/arrays/base/_modify.py:28
↓ 2 callersFunctionvisualize
Visualize the Grid. grid: Grid The grid to visualize. layout: str The layout to use. If 'layout' is not provided ("
src/power_grid_model_ds/_core/visualizer/app.py:26
↓ 1 callersMethod__init__
(self, candidate_nodes: list[int])
src/power_grid_model_ds/_core/model/graphs/models/rustworkx.py:146
↓ 1 callersMethod_add_branch
(self, from_node_id: int, to_node_id: int)
src/power_grid_model_ds/_core/model/graphs/models/base.py:398
↓ 1 callersMethod_add_branches
(self, from_node_ids: list[int], to_node_ids: list[int])
src/power_grid_model_ds/_core/model/graphs/models/base.py:401
↓ 1 callersMethod_add_node
(self, ext_node_id: int)
src/power_grid_model_ds/_core/model/graphs/models/base.py:389
↓ 1 callersMethod_add_nodes
(self, ext_node_ids: list[int])
src/power_grid_model_ds/_core/model/graphs/models/base.py:392
↓ 1 callersMethod_all_branches
(self)
src/power_grid_model_ds/_core/model/graphs/models/base.py:423
↓ 1 callersMethod_append
Append the given asset_array to the corresponding field of Grid and generate ids. Args: array: the asset_array to be appe
src/power_grid_model_ds/_core/model/containers/base.py:173
↓ 1 callersFunction_args2kwargs
Parses the args to kwargs.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:149
↓ 1 callersFunction_array_equal_with_nan
(array1: "FancyArray", array2: "FancyArray")
src/power_grid_model_ds/_core/fancypy.py:51
↓ 1 callersMethod_branch_is_relevant
Check if a branch is relevant
src/power_grid_model_ds/_core/model/graphs/models/base.py:367
↓ 1 callersFunction_build_filter_mask_for_field
(array: np.ndarray, field: str, values)
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:82
↓ 1 callersMethod_create_power_grid_array
Create power grid model array
src/power_grid_model_ds/_core/load_flow.py:105
↓ 1 callersMethod_delete_branch
Raises: MissingBranchError: if the branch does not exist
src/power_grid_model_ds/_core/model/graphs/models/base.py:404
↓ 1 callersMethod_delete_node
(self, node_id: int)
src/power_grid_model_ds/_core/model/graphs/models/base.py:395
↓ 1 callersFunction_determine_column_overlap
Returns two lists: columns present in both arrays and the columns that are only present in from_array
src/power_grid_model_ds/_core/model/arrays/base/_build.py:89
↓ 1 callersFunction_determine_column_widths
Get the maximum width of each column in the array.
src/power_grid_model_ds/_core/model/arrays/base/_string.py:59
↓ 1 callersFunction_fill_defaults
Fills the defaults into the array.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:63
↓ 1 callersFunction_fill_with_kwargs
Fills the kwargs into the array.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:73
↓ 1 callersMethod_find_first_connected
(self, node_id: int, candidate_node_ids: list[int])
src/power_grid_model_ds/_core/model/graphs/models/base.py:380
↓ 1 callersMethod_find_fundamental_cycles
(self)
src/power_grid_model_ds/_core/model/graphs/models/base.py:420
↓ 1 callersFunction_find_unused_edges_rustworkx
Determine unused edges by comparing all edges with a subset of edges in the MST.
src/power_grid_model_ds/_core/model/graphs/models/_rustworkx_search.py:45
↓ 1 callersMethod_from_pickle
(cls, pickle_path: Path)
src/power_grid_model_ds/_core/model/grids/base.py:405
↓ 1 callersFunction_get_active_component_branches
(grid: "Grid", component_node_ids: list[int])
src/power_grid_model_ds/_core/model/grids/helpers.py:97
↓ 1 callersMethod_get_all_paths
(self, source, target)
src/power_grid_model_ds/_core/model/graphs/models/base.py:414
↓ 1 callersMethod_get_arrays_with_duplicates
(id_arrays: list[FancyArray], check: bool)
src/power_grid_model_ds/_core/model/containers/base.py:236
↓ 1 callersFunction_get_columns_store
(grid: Grid)
src/power_grid_model_ds/_core/visualizer/app.py:55
↓ 1 callersMethod_get_components
(self)
src/power_grid_model_ds/_core/model/graphs/models/base.py:417
↓ 1 callersMethod_get_connected
(self, node_id: int, nodes_to_ignore: list[int], inclusive: bool = False)
src/power_grid_model_ds/_core/model/graphs/models/base.py:377
↓ 1 callersFunction_get_cycle_paths_rustworkx
Find nodes that are part of a cycle in the graph using the MST.
src/power_grid_model_ds/_core/model/graphs/models/_rustworkx_search.py:53
↓ 1 callersMethod_get_duplicates_between_arrays
(id_arrays: list[FancyArray], check: bool)
src/power_grid_model_ds/_core/model/containers/base.py:224
↓ 1 callersMethod_get_empty_arrays
(cls)
src/power_grid_model_ds/_core/model/containers/base.py:203
↓ 1 callersFunction_get_feeder_branch
(component_branches: BranchArray)
src/power_grid_model_ds/_core/model/grids/helpers.py:107
↓ 1 callersFunction_get_feeder_node_id
(feeder_branch: BranchArray, feeder_node_ids: np.ndarray)
src/power_grid_model_ds/_core/model/grids/helpers.py:120
↓ 1 callersFunction_get_graph_layout
Determine the graph layout
src/power_grid_model_ds/_core/visualizer/app.py:86
↓ 1 callersMethod_get_shortest_path
(self, source, target)
src/power_grid_model_ds/_core/model/graphs/models/base.py:411
↓ 1 callersFunction_get_size
Returns the size of the values.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:142
↓ 1 callersFunction_get_start_and_end_rows
(array: "FancyArray", rows: int)
src/power_grid_model_ds/_core/model/arrays/base/_string.py:88
↓ 1 callersFunction_get_timings
Return a generator with the timings for each array type.
tests/performance/_helpers.py:50
↓ 1 callersMethod_has_branch
(self, from_node_id, to_node_id)
src/power_grid_model_ds/_core/model/graphs/models/base.py:383
↓ 1 callersMethod_in_branches
(self, int_node_id: int)
src/power_grid_model_ds/_core/model/graphs/models/base.py:374
↓ 1 callersFunction_initialize_filter_mask
(mode_: Literal["AND", "OR"], size: int)
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:110
↓ 1 callersFunction_parse
(args: tuple[int | Iterable[int] | NDArray, ...] | NDArray[np.int64], kwargs)
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:96
↓ 1 callersFunction_parse_2d_array
Parses the 2d array to a 1d array.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:107
↓ 1 callersFunction_parse_array
(array: np.ndarray, dtype: np.dtype)
src/power_grid_model_ds/_core/model/arrays/base/_build.py:97
↓ 1 callersFunction_parse_input
Combines the args and kwargs to a dict.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:39
↓ 1 callersFunction_parse_kwargs
Parses the kwargs to a dict of np.ndarrays.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:123
↓ 1 callersFunction_parse_structured_array
(from_array: np.ndarray, to_array: np.ndarray)
src/power_grid_model_ds/_core/model/arrays/base/_build.py:79
↓ 1 callersFunction_print_timings
(timings: Generator)
tests/performance/_helpers.py:39
↓ 1 callersFunction_reset_feeder_ids
(grid: "Grid")
src/power_grid_model_ds/_core/model/grids/helpers.py:87
↓ 1 callersMethod_update_id_counter
(self, array, check_max_id: bool = True)
src/power_grid_model_ds/_core/model/containers/base.py:210
↓ 1 callersMethod_validate_branches
(arrays: "Grid")
src/power_grid_model_ds/_core/model/graphs/container.py:157
↓ 1 callersMethodadd_branch
Add a branch to all graphs
src/power_grid_model_ds/_core/model/graphs/container.py:81
↓ 1 callersMethodadd_branch
Add a new branch to the graph.
src/power_grid_model_ds/_core/model/graphs/models/base.py:135
↓ 1 callersMethodadd_branch
Add a branch to the grid
src/power_grid_model_ds/_core/model/grids/_text_sources.py:91
↓ 1 callersMethodadd_branch3_array
Add all branch3s in the branch3 array to the graph.
src/power_grid_model_ds/_core/model/graphs/models/base.py:175
↓ 1 callersMethodadd_branches
Add branches to the grid
src/power_grid_model_ds/_core/model/grids/_text_sources.py:86
↓ 1 callersMethodadd_node_array
Add all nodes in the node array to the graph.
src/power_grid_model_ds/_core/model/graphs/models/base.py:114
↓ 1 callersMethodadd_nodes
Add nodes to the grid
src/power_grid_model_ds/_core/model/grids/_text_sources.py:67
↓ 1 callersFunctionapply_exclude
Return an array without records that match the input parameters. Note: output could be an empty array.
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:50
↓ 1 callersFunctionapply_get
Returns a record that matches the input parameters. If no or multiple records match the input parameters, an error is raised.
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:62
↓ 1 callersMethodas_df
Convert to pandas DataFrame
src/power_grid_model_ds/_core/model/arrays/base/array.py:321
↓ 1 callersMethodattach_ids
Generate and attach ids to the given FancyArray. Also updates _id_counter. Args: array(FancyArray): the array of which the id col
src/power_grid_model_ds/_core/model/containers/base.py:123
↓ 1 callersFunctionbuild_array
Constructs the array from the given args/kwargs.
src/power_grid_model_ds/_core/model/arrays/base/_build.py:17
↓ 1 callersFunctionbuild_basic_grid_with_three_winding
Build a grid with three winding transformer
tests/fixtures/grids.py:111
↓ 1 callersFunctioncheck_ids
Check for duplicate ids within the array
src/power_grid_model_ds/_core/model/arrays/base/_modify.py:51
↓ 1 callersMethodcheck_ids
Checks for duplicate id values across all arrays in the container. Args: check_between_arrays(bool): whether to check for duplica
src/power_grid_model_ds/_core/model/containers/base.py:81
↓ 1 callersFunctionconvert_array_to_string
Return a string representation of the array as a table. Args: column_width: the width of each column in the table. Will be determined by
src/power_grid_model_ds/_core/model/arrays/base/_string.py:17
↓ 1 callersMethoddelete_branch
Remove a branch from all graphs
src/power_grid_model_ds/_core/model/graphs/container.py:111
↓ 1 callersMethoddelete_branch
Remove an existing branch from the graph. Args: from_ext_node_id: id of the from node to_ext_node_id: id of the to no
src/power_grid_model_ds/_core/model/graphs/models/base.py:142
↓ 1 callersMethoddelete_branch3_array
Delete all branch3s in the branch3 array from the graph.
src/power_grid_model_ds/_core/model/graphs/models/base.py:187
↓ 1 callersMethoddelete_node_array
Delete all nodes in node_array from the graph
src/power_grid_model_ds/_core/model/graphs/models/base.py:120
↓ 1 callersMethodempty
Get empty instance of GraphContainer. Args: graph_model (type[BaseGraphModel]): The graph model to use. Defaults to RustworkxGrap
src/power_grid_model_ds/_core/model/graphs/container.py:44
↓ 1 callersFunctionfile2gzip
zip a gzip (.gz) file
src/power_grid_model_ds/_core/utils/zip.py:64
↓ 1 callersFunctionfind_fundamental_cycles_rustworkx
Detect fundamental cycles in the graph and returns the node cycle paths. The nodes in cycles are found by: 1. Creating a minimum spanning for
src/power_grid_model_ds/_core/model/graphs/models/_rustworkx_search.py:10
↓ 1 callersMethodfrom_txt_file
Load grid from txt file Args: txt_file_path (Path): The path to the txt file
src/power_grid_model_ds/_core/model/grids/base.py:428
↓ 1 callersFunctionget_coordinated_grid
()
tests/integration/visualizer_tests.py:22
↓ 1 callersFunctionget_installed_graph_models
()
tests/conftest.py:23
↓ 1 callersFunctionget_radial_grid
()
tests/integration/visualizer_tests.py:18
↓ 1 callersFunctionload_from_pickle
Load a python object from a pickle file
src/power_grid_model_ds/_core/utils/pickle.py:20
↓ 1 callersFunctionparse_branches
Parse the branches.
src/power_grid_model_ds/_core/visualizer/parsers.py:29
↓ 1 callersFunctionperf_test_add_lines
()
tests/performance/grid_performance_tests.py:23
↓ 1 callersFunctionperf_test_add_nodes
()
tests/performance/grid_performance_tests.py:10
↓ 1 callersFunctionperf_test_get_downstream_nodes_performance
()
tests/performance/grid_performance_tests.py:40
↓ 1 callersFunctionperftest_add_node
()
tests/performance/graph_performance_tests.py:41
↓ 1 callersFunctionperftest_delete_node
()
tests/performance/graph_performance_tests.py:31
↓ 1 callersFunctionperftest_fancypy_concat
()
tests/performance/array_performance_tests.py:86
↓ 1 callersFunctionperftest_fancypy_sort
()
tests/performance/array_performance_tests.py:104
↓ 1 callersFunctionperftest_fancypy_unique
()
tests/performance/array_performance_tests.py:95
↓ 1 callersFunctionperftest_filter
()
tests/performance/filter_performance_tests.py:20
↓ 1 callersFunctionperftest_from_arrays
()
tests/performance/graph_performance_tests.py:36
↓ 1 callersFunctionperftest_get
()
tests/performance/filter_performance_tests.py:11
↓ 1 callersFunctionperftest_get_components
()
tests/performance/graph_performance_tests.py:17
↓ 1 callersFunctionperftest_initialize
()
tests/performance/array_performance_tests.py:26
↓ 1 callersFunctionperftest_initialize
()
tests/performance/graph_performance_tests.py:13
↓ 1 callersFunctionperftest_loop_data_get_field
()
tests/performance/array_performance_tests.py:76
← previousnext →101–200 of 625, ranked by callers