commonpower.control.safety_layer.penalties.BasePenalty

class BasePenalty[source]

Bases: object

Base class for penalties. A penalty is computed if the action proposed by the agent needs to be changed by the safety layer.

Methods

get_correction_penalty

Computes the penalty, must be implememnted by subclasses.

get_correction_penalty(**kwargs) float[source]

Computes the penalty, must be implememnted by subclasses. :param None:

Returns:

float – penalty