LoadProfile API Reference
geoloop.loadflowdata.loadprofile.LoadProfile
Class to generate heat load profiles for simulations. Supports constant, variable, Bernier synthetic, or from-file time series of heat demand.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Type of load profile: 'BERNIER', 'CONSTANT', 'VARIABLE', 'FROMFILE'. |
base |
float
|
Base heat load (W) for VARIABLE type. |
peak |
float
|
Peak heat load (W) for VARIABLE type. |
filepath |
str
|
Path to CSV file if FROMFILE type is used. |
outdir |
str
|
Directory to save processed outputs (e.g., smoothed data). |
scale |
float
|
Scaling factor for loads read from file. |
minQ |
float
|
Minimum heat load (W) when using FROMFILE type. |
minscaleflow |
float
|
Minimum scaling factor for flow computation. |
inputcolumn |
str
|
Name of the column in CSV file containing heat demand. |
smoothing |
(int or str, optional)
|
Smoothing applied to time series: int for rolling window, 'D' or 'M' for daily/monthly. |
table |
DataFrame
|
Loaded table when using FROMFILE type. |
__init__
__init__(
type,
base=4000,
peak=4000,
filepath=None,
outdir=None,
inputdir=None,
scale=1,
minQ=0,
minscaleflow=1,
inputcolumn="heating_demand",
smoothing=None,
)
Initialize the LoadProfile object.
getloadtable
Load the time-variable heat demand table from CSV file.
Returns:
| Type | Description |
|---|---|
DataFrame
|
Data frame containing the heat demand table. |
getload
Compute heat load for given times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
ndarray
|
Array of times in hours. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Heat load values (W) at the specified times. |
getloadflow
Compute heat load and flow_data rate, scaling flow_data based on maximum load.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
ndarray
|
Times in hours. |
required |
m_flow
|
float
|
Maximum flow_data rate for scaling. |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
Tuple of (heat load array, scaled flow_data rate array) |
variable
Generate a variable load profile using cosine function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
ndarray
|
Times in hours. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Load values (W). |
constant
Generate a constant load profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
ndarray
|
Times in hours. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Constant load array (W). |
bernier
Generate synthetic load profile of Bernier et al. (2004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
ndarray
|
Times in hours. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Synthetic Bernier load array (W). |
fromfile
Interpolate heat load from CSV table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
ndarray
|
Times in hours. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Interpolated and scaled heat load array (W). |
from_config
classmethod
Create LoadProfile instance from configuration dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
LoadProfileConfig
|
Configuration object containing load profile type and parameters. |
required |
Returns:
| Type | Description |
|---|---|
LoadProfile
|
Initialized load profile object. |