sunpeek.core_methods.virtuals.calculations.InternalShading#

class sunpeek.core_methods.virtuals.calculations.InternalShading(component, strategies=None, *args, **kwargs)#

Bases: CoreAlgorithm

Calculates internal shading (row-to-row shading) related virtual sensors of a collector component.

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()

get_config_feedback()

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:

None

static create_variants(arg, allowed_type, default)#

Create list with sanitized inputs for algo strategies. Set default if needed.

:raises TypeError : if `arg` or default does not match allowed_type.: :raises AlgorithmError : if no valid variants are found:

Return type:

List[Any]

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:

AlgoResult

:raises AlgorithmError : if algorithm has no strategies defined, or if getting some strategy problems fails.: