Const Profile Controller
Controller Data
- class pandaprosumer.controller.data_model.const_profile.ConstProfileControllerData(input_columns: List[str], result_columns: List[str], period_index: int = None)[source]
Data class for constant profile controller.
Attributes
- input_columnsList[str]
List of input column names.
- result_columnsList[str]
List of result column names.
- period_indexint, optional
Index of the period, default is None.
Controller
This controller is made for the use with the time series module to read data from a DataSource and write it to the prosumer. The controller can write the values to the any input of a controller in the same prosumer.
- class pandaprosumer.controller.const_profile.ConstProfileController(prosumer, const_object, df_data: DFData, order=-1, level=-1, in_service=True, index=None, drop_same_existing_ctrl=False, overwrite=False, name=None, matching_params=None, temp_fluid_map_idx=None, mdot_fluid_map_idx=None, **kwargs)[source]
Controller for constant profiles. Map the values from a DataFrame f_data to its output for mapping to other controllers. Should be executed first (lowest level/order) Inherit from MappedController but not from BasicProsumerController as can be mapped to the input of other controllers but without asking for the required mass flow and temperatures.
- Parameters:
prosumer – The prosumer object
const_object – The constant object
df_data – The data frame data
order – The order of the controller
level – The level of the controller
in_service – The in-service status of the controller
drop_same_existing_ctrl – Whether to drop existing controllers of the same type
overwrite – Whether to overwrite existing controllers
kwargs – Additional keyword arguments
Period Handling
A period needs to be defined to use the ConstProfileController.
If no period is explicitly set for the controller, it will try to detect a period column in the DataFrame provided by the DataSource. If this column exists, a default period will automatically be created and used.
If neither a period is defined nor a period column is present in the DataFrame, an error will be raised.