IntegralPy Documentation
integralpy.grid module
- class
integralpy.grid.
BaseLoadFlowStatus
(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None) Bases:
Enum
-
enbfehler
= 1
-
enbfehlerausfall
= 3
-
enbfehlerflred
= 10
-
enbfehlergrundfall
= 2
-
enbfehlerkeineredf
= 7
-
enbfehlerkeineredkn
= 8
-
enbfehlerkeinesit
= 4
-
enbfehlerksred
= 11
-
enbfehlerpmax
= 12
-
enbfehlerpvpq
= 6
-
enbfehlerza
= 5
-
enbgekilled
= 13
-
enbinstabil
= 14
-
enbnnf_prf_max
= 1100
-
enbnnf_prf_min
= 1000
-
enbok
= 0
-
enbshm_under
= 15
-
enbstunbekannt
= 99999999
-
enbwarnpseudomessung
= 9
-
integralpy.session module
-
integralpy.session.
handle_absolute_and_relative_path
(path: str) -> str
Module contents
- class
integralpy.
Grid
(channel) Bases:
object
-
calculate_base_load_flow
() Starts Grundlastfluss calculation.
-
create
(type) Creates a new object of given type and returns the object.
Parameters
- type : single integralpy.Type
Defines what type of object should be created.
Returns
- result : single google.protobuf.message
Returns a newly created object.
-
export_to_db
(db_name, ip, username, password, port) Exports the current grid to database.
-
get
(type=[], attr=[], ids=[]) Fetches a single object or a list of objects.
Parameters
- type : single integralpy.Type or list of integralpy.Type
Defines what types of objects should be fetched.
- attr: single intergralpy.Attribute or list of integralpy.Attribute
Defines what attributes of what object types should be fetched.
- ids: single number or list of numbers
Defines what objects by id should be fetched.
Returns
- result : single google.protobuf.message or list of google.protobuf.message
Returns a single or list of objects from grid.
-
get_base_load_flow_results
() Get two tables of results in CSV format.
-
get_branch_max_load_results
() Returns a dictionary with key the id of branch and value the maximum load of the branch.
Returns
- result : dict
Returns a dictionary with key as id of branch and value as the maximum load of the branch
-
get_connected_loads_and_injections
(id)
-
makroAPI
()
-
remove
(objects) Removes multiple objects from the grid data.
Parameters
- objects : list of google.protobuf.message or of numbers
Defines what objects should be removed from the grid by the object or id.
-
remove_attribute
(type, attr=[], ids=[]) Removes attributes of exisiting objects.
Parameters
- type : single integralpy.Type or list of integralpy.Type
Defines what types of objects should have attributes removed.
- attr: single intergralpy.Attribute or list of integralpy.Attribute
Defines what attributes of what object types should be removed.
- ids: single number or list of numbers
Defines what objects by id should have their attributes changed.
-
remove_grid
()
-
update
() Updates the pointers and fields of internal grid model.
-
write
(objects) Writes single or multiple objects to the grid data.
Parameters
- objects : single google.protobuf.message or list of google.protobuf.message
Defines what objects should be written to the grid. The not given attributes are not changed in the grid.
-
- class
integralpy.
Session
(url=None) Bases:
object
-
close
() Close gRPC connection gracefully.
-
get_current_grid
() Returns integralpy.Grid object for currently loaded grid.
Returns
- result : integralpy.Grid
Returns a Grid object
-
import_from_db
(dbname, host_ip, username, password, port) Loads grid data from database and returns integralpy.Grid object.
Parameters
- dbname : str
Database name
- host_ip : str
Host name
- username : str
User name
- password : str
Password
- port : int
Port number
Returns
- result : integralpy.Grid
Returns a Grid object
-
load_grid_file
(path) Loads grid data from file and returns integralpy.Grid object.
Parameters
- path : str
Relative or absolute path to locally stored .xml or .zip grid data.
Returns
- result : integralpy.Grid
Returns a Grid object
-
load_grid_file_cim
(paths) Loads CIM grid data from ZIP file and returns integralpy.Grid object.
Parameters
- path : list of str
List of absolute paths where of the ZIP files.
Returns
- result : integralpy.Grid
Returns a Grid object
-
merge_tso_dso_and_load_grid_files
(tso_files, dso_files, boundary_file) Loads and merges grid from TSO and DSO grid ZIP files and returns integralpy.Grid object.
Parameters
- tso_files : list of str
List of absolute paths where the ZIP files for TSO grid.
- dso_files : list of str
List of absolute paths where the ZIP files for TSO grid.
- boundary_file : str
Absolute path for boundary data.
Returns
- result : integralpy.Grid
Returns a Grid object
-
-
integralpy.
connect
(host=None) Initializes the connection to the host and returns a session object.
Parameters
- host : str
The host (e.g. IP address and port)
Returns
- result : integralpy.Session
Returns a Session object