sunpeek.core_methods.virtuals.main#
This module implements functionality for calculation and verification of virtual sensors.
It contains two entry-point functions for doing virtual sensor stuff. - config_virtuals():
Is fast to run, only depends on plant config, no calculations.
Attaches a CoreMethodFeedback to all virtual sensors, stating if it _can_ be calculated / why not
- calculate_virtuals():
Actually calculates virtual sensors for all components.
Calculation logic is hard coded.
## Details
Implements functions that calculate groups of virtual sensors (one calculation call returns data for multiple virtual sensors).
Calculations generally return unit-aware pd.Series objects,
pd.Series with dtype pint[unit]
.Internal functions (underscore functions) may also accept and return arguments as numeric values in appropriate units
(as opposed to the main calculations which work with pint Quantities). See local docstrings for details. - The module also implements functions to verify / assert calculation inputs.
## Note for developers: - Virtual sensors may use data and parameters of various objects in their calculations (e.g. plant latitude, array irradiance, array area etc.). Therefore, virtual sensors are associated to one and only one component. They may not be linked / associated with more than one component, like real sensors which can be “shared” by multiple components.
Code author: Philip Ohnewein <p.ohnewein@aee.at>
Code author: Daniel Tschopp <d.tschopp@aee.at>
Code author: Marnoch Hamilton-Jones <m.hamilton-jones@aee.at>
Functions
|
Implements all the logic of the virtual sensor calculation. |
|
Creates & maps virtual sensors for all components. |