sunpeek.core_methods.virtuals.calculations.ThermalPower#
- class sunpeek.core_methods.virtuals.calculations.ThermalPower(component, strategies=None, *args, **kwargs)#
Bases:
CoreAlgorithm
Thermal power for Plant and Arrays.
Methods
__init__
(component[, strategies])allowed_components
()check_interval
([eval_start, eval_end])Make sure we have data in the specified interval, and check that plant's virtual sensors are up-to-date.
create_variants
(arg, allowed_type, default)Create list with sanitized inputs for algo strategies.
define_strategies
()Cycle through all algo strategies, return CoreMethodFeedback of all strategy problems.
run
([on_strategy_error])Calculates algorithm using its defined strategies, stopping at the first successful strategy.
- check_interval(eval_start=None, eval_end=None)#
Make sure we have data in the specified interval, and check that plant’s virtual sensors are up-to-date.
- Return type:
- static create_variants(arg, allowed_type, default)#
Create list with sanitized inputs for algo strategies. Set default if needed.
:raises TypeError :
if `arg`
ordefault
does not matchallowed_type
.: :raises AlgorithmError :if no valid variants are found
:
- get_config_feedback()#
Cycle through all algo strategies, return CoreMethodFeedback of all strategy problems. Stops at first successful strategy, copies problem slots from strategy.
- Return type:
CoreMethodFeedback
- run(on_strategy_error='skip')#
Calculates algorithm using its defined strategies, stopping at the first successful strategy.
- Parameters:
on_strategy_error (
str
, optional) – If ‘raise’, exceptions that occur during a strategy.execute() are raised. If not, they are saved as own_feedback in self.problems. In any case, errors are logged.- Return type:
:raises AlgorithmError :
if algorithm has no strategies defined
, orif getting some strategy problems fails.
: