NetSimulationTab package
Network Simulation Tab Module
District heating network simulation and calculation interface with pandapipes integration.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.calculation_tab.CalculationTab(folder_manager, data_manager, config_manager, parent=None)[source]
Bases:
QWidgetNetwork simulation tab for district heating system calculations.
Note
Provides interface for network generation, time series simulation, and visualization of heating network data using pandapipes.
- data_added
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- __init__(folder_manager, data_manager, config_manager, parent=None)[source]
Initialize calculation tab.
- updateDefaultPath(new_base_path)[source]
Update project base path.
- Parameters:
new_base_path (str) – New base path.
- setupPlotLayout()[source]
Setup layout with network plot and info on top, time series full width below.
- generateNetworkCallback(NetworkGenerationData)[source]
Handle network generation callback.
- Parameters:
NetworkGenerationData (object) – Network generation data.
- on_initialization_done(NetworkGenerationData)[source]
Handle initialization completion.
- Parameters:
NetworkGenerationData (object) – Network generation data.
- create_info_card(title, value, unit='', description='')[source]
Create a compact info card for displaying network data.
- plot_pandapipes_net(force_refresh: bool = False)[source]
Plot pandapipes network visualization using interactive Plotly.
- Parameters:
force_refresh (bool) – If True, regenerate the plot even if cached version exists.
- on_time_series_simulation_done(NetworkGenerationData)[source]
Handle time series simulation completion.
- Parameters:
NetworkGenerationData (object) – Network generation data with results.
- on_time_series_simulation_error(error_message)[source]
Handle simulation errors.
- Parameters:
error_message (str) – Error message to display.
- update_time_series_plot()[source]
Update time series plot based on selected data with modern styling.
- get_data_path()[source]
Get absolute path to data directory.
- Returns:
Data directory path.
- Return type:
- saveNet(show_dialog=True)[source]
Save network data to pickle, CSV, and JSON files.
- Parameters:
show_dialog (bool) – Whether to show success/error dialogs.
- loadNet(show_dialog=True)[source]
Load network data from saved files.
- Parameters:
show_dialog (bool) – Whether to show success/error dialogs.
- load_net_results(show_dialog=True)[source]
Load network simulation results from CSV file.
- Parameters:
show_dialog (bool) – Whether to show warning dialogs.
- exportNetGeoJSON(show_dialog=True)[source]
Export dimensioned network to unified GeoJSON format.
- Parameters:
show_dialog (bool) – Whether to show success/error dialogs.
- recalculateNetwork()[source]
Recalculate network with current pipe parameters (pipeflow only, no optimization).
Diameter Optimization Tab Module
UI tab for pipe diameter optimization settings in district heating networks.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.diameter_optimization_tab.DiameterOptimizationTab(dialog_config, parent=None)[source]
Bases:
QWidgetWidget for configuring pipe diameter optimization parameters.
- __init__(dialog_config, parent=None)[source]
Initialize diameter optimization tab.
- Parameters:
dialog_config (dict) – Configuration data for dialog settings.
parent (QWidget) – Parent widget.
- createDiameterOptCheckbox()[source]
Create checkbox for enabling diameter optimization.
- Returns:
Layout containing checkbox.
- Return type:
QVBoxLayout
Network Calculation Threads Module
Threaded network initialization and calculation functionality.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.net_calculation_threads.NetInitializationThread(NetworkGenerationData)[source]
Bases:
QThreadThread for network initialization tasks.
- calculation_done
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- calculation_error
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- class districtheatingsim.gui.NetSimulationTab.net_calculation_threads.NetCalculationThread(NetworkGenerationData, simplified=False)[source]
Bases:
QThreadThread for network time series calculations.
- calculation_done
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- calculation_error
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
Network Generation Dialog Module
Dialog for configuring network generation parameters with tabbed interface.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- districtheatingsim.gui.NetSimulationTab.net_generation_dialog.load_dialog_config(config_path='dialog_config.json')[source]
Load dialog configuration from JSON file.
- districtheatingsim.gui.NetSimulationTab.net_generation_dialog.save_dialog_config(config, config_path='dialog_config.json')[source]
Save dialog configuration to JSON file.
- class districtheatingsim.gui.NetSimulationTab.net_generation_dialog.NetGenerationDialog(generate_callback, base_path, parent=None, config_path='dialog_config.json')[source]
Bases:
QDialogDialog for network generation configuration with multiple tabs.
Network Configuration Tab Module
Tab for network configuration parameters in district heating systems.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.network_config_tab.NetworkConfigTab(dialog_config, parent=None)[source]
Bases:
QWidgetWidget for configuring district heating network parameters.
- __init__(dialog_config, parent=None)[source]
Initialize network configuration tab.
- Parameters:
dialog_config (dict) – Configuration data.
parent (QWidget) – Parent widget.
- createNetconfigurationControlInput()[source]
Create network configuration selection input.
- Returns:
Layout containing configuration controls.
- Return type:
QVBoxLayout
- createTemperatureControlInput()[source]
Create temperature control selection input.
- Returns:
Layout containing temperature controls.
- Return type:
QVBoxLayout
- createSupplyTemperatureCheckbox()[source]
Create supply temperature configuration checkbox.
- Returns:
Layout containing supply temperature checkbox.
- Return type:
QVBoxLayout
- createReturnTemperatureCheckbox()[source]
Create return temperature configuration checkbox.
- Returns:
Layout containing return temperature checkbox.
- Return type:
QVBoxLayout
- createBuildingTemperatureCheckbox()[source]
Create building temperature configuration checkbox.
- Returns:
Layout containing building temperature checkbox.
- Return type:
QVBoxLayout
- createNetParameterInputs()[source]
Create network parameter input fields.
- Returns:
Layout containing parameter inputs.
- Return type:
QVBoxLayout
- createHeatConsumerParameterInputs()[source]
Create heat consumer parameter input fields.
- Returns:
Layout containing heat consumer inputs.
- Return type:
QVBoxLayout
- createParameterRow(label_text, default_text)[source]
Create a parameter input row with label and text field.
- createinitialpipetypeInput()[source]
Create pipe type selection input.
- Returns:
Layout containing pipe type selection.
- Return type:
QVBoxLayout
- set_layout_visibility(layout, visible)[source]
Set visibility of all widgets in a layout.
- Parameters:
layout (QLayout) – Layout to update.
visible (bool) – Visibility state.
Network Data Tab Module
Tab for network data file selection and preview visualization.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.network_data_tab.NetworkDataTab(base_path, dialog_config, parent=None)[source]
Bases:
QWidgetWidget for selecting network data files and previewing GeoJSON data.
- createGeojsonInputs()[source]
Create GeoJSON file input layouts.
- Returns:
List of input layouts.
- Return type:
- createFileInputsGeoJSON(default_network_path)[source]
Create file input widget for unified network GeoJSON file.
- Parameters:
default_network_path (str) – Default path to Wärmenetz.geojson.
- Returns:
Layout containing file input.
- Return type:
QVBoxLayout
- createFileInput(label_text, default_text)[source]
Create file input row with label, text field, and browse button.
- selectFilename(line_edit)[source]
Open file dialog and update line edit with selected file.
- Parameters:
line_edit (QLineEdit) – Line edit widget to update.
- set_layout_visibility(layout, visible)[source]
Set visibility of all widgets in a layout.
- Parameters:
layout (QLayout) – Layout to update.
visible (bool) – Visibility state.
Producer Order Tab Module
Tab for selecting and ordering heat producers in district heating networks.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.producer_order_tab.ProducerOrderTab(dialog_config, parent=None)[source]
Bases:
QWidgetWidget for configuring heat producer selection and priority order.
- __init__(dialog_config, parent=None)[source]
Initialize producer order tab.
- Parameters:
dialog_config (dict) – Configuration data.
parent (QWidget) – Parent widget.
- create_producer_selection()[source]
Create producer selection interface components.
- Returns:
Layout containing producer selection widgets.
- Return type:
QVBoxLayout
- read_producers_from_geojson(filepath)[source]
Read producer data from unified GeoJSON file.
- Parameters:
filepath (str) – Path to unified network GeoJSON file.
- Returns:
List of producer dictionaries.
- Return type:
- Raises:
FileNotFoundError – If GeoJSON file not found.
Time Series Dialog Module
Dialog for configuring time series calculation parameters.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.NetSimulationTab.timeseries_dialog.TimeSeriesCalculationDialog(base_path, parent=None)[source]
Bases:
QDialogDialog for time series calculation configuration.
- __init__(base_path, parent=None)[source]
Initialize time series calculation dialog.
- Parameters:
base_path (str) – Base path for file dialogs.
parent (QWidget) – Parent widget.
- validateInputs()[source]
Validate start and end time steps.
- Returns:
True if inputs are valid.
- Return type: