Package io.openems.edge.ess.power.api
Interface Power
-
- All Known Subinterfaces:
PowerComponent
- All Known Implementing Classes:
DummyPower
,PowerComponentImpl
public interface Power
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
log
static Constraint[]
NO_CONSTRAINTS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Constraint
addConstraint(Constraint constraint)
Adds a Constraint.Constraint
addConstraintAndValidate(Constraint constraint)
Adds a Constraint if the problem is still solvable afterwards.Constraint
createSimpleConstraint(java.lang.String description, ManagedSymmetricEss ess, Phase phase, Pwr pwr, Relationship relationship, double value)
Creates a simple constraint.default int
fitValueIntoMinMaxPower(java.lang.String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value)
Adjusts the given value so that it fits into Min/MaxPower.default int
fitValueToMaxPower(java.lang.String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value)
Adjusts the given value so that it does not break an existing Max-Power-Constraint.default int
fitValueToMinPower(java.lang.String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value)
Adjusts the given value so that it does not break an existing Min-Power-Constraint.Coefficient
getCoefficient(ManagedSymmetricEss ess, Phase phase, Pwr pwr)
Gets the Coefficient singleton for a specific combination of ess, phase and pwr.int
getMaxPower(ManagedSymmetricEss ess, Phase phase, Pwr pwr)
Gets the maximum possible Power under the active Constraints.int
getMinPower(ManagedSymmetricEss ess, Phase phase, Pwr pwr)
Gets the minimum possible possible Power under the active Constraints.PidFilter
getPidFilter()
Gets the PidFilter instance with the configured P, I and D variables.boolean
isPidEnabled()
Check if PidFilter is enabled.void
removeConstraint(Constraint constraint)
Removes a Constraint.
-
-
-
Field Detail
-
log
static final org.slf4j.Logger log
-
NO_CONSTRAINTS
static final Constraint[] NO_CONSTRAINTS
-
-
Method Detail
-
addConstraint
Constraint addConstraint(Constraint constraint)
Adds a Constraint.- Parameters:
constraint
- theConstraint
- Returns:
- the
Constraint
-
addConstraintAndValidate
Constraint addConstraintAndValidate(Constraint constraint) throws OpenemsException
Adds a Constraint if the problem is still solvable afterwards.- Parameters:
constraint
- theConstraint
- Returns:
- the
Constraint
- Throws:
PowerException
- on errorOpenemsException
- on error
-
createSimpleConstraint
Constraint createSimpleConstraint(java.lang.String description, ManagedSymmetricEss ess, Phase phase, Pwr pwr, Relationship relationship, double value) throws OpenemsException
Creates a simple constraint.- Parameters:
description
- a description (for debug)ess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
relationship
- theRelationship
value
- the value- Returns:
- the
Constraint
- Throws:
OpenemsException
- on error
-
removeConstraint
void removeConstraint(Constraint constraint)
Removes a Constraint.- Parameters:
constraint
- theConstraint
-
getMaxPower
int getMaxPower(ManagedSymmetricEss ess, Phase phase, Pwr pwr)
Gets the maximum possible Power under the active Constraints.- Parameters:
ess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
- Returns:
- the maximum possible power
-
getMinPower
int getMinPower(ManagedSymmetricEss ess, Phase phase, Pwr pwr)
Gets the minimum possible possible Power under the active Constraints.- Parameters:
ess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
- Returns:
- the minimum possible power
-
getCoefficient
Coefficient getCoefficient(ManagedSymmetricEss ess, Phase phase, Pwr pwr) throws OpenemsException
Gets the Coefficient singleton for a specific combination of ess, phase and pwr.- Parameters:
ess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
- Returns:
- the
Coefficient
- Throws:
OpenemsException
- on error
-
fitValueIntoMinMaxPower
default int fitValueIntoMinMaxPower(java.lang.String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value)
Adjusts the given value so that it fits into Min/MaxPower.- Parameters:
componentId
- Component-ID of the calling component for the log messageess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
value
- the target value- Returns:
- a value that fits into Min/MaxPower
-
fitValueToMaxPower
default int fitValueToMaxPower(java.lang.String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value)
Adjusts the given value so that it does not break an existing Max-Power-Constraint.- Parameters:
componentId
- Component-ID of the calling component for the log messageess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
value
- the target value- Returns:
- a value that is compared to existing Max-Power
-
fitValueToMinPower
default int fitValueToMinPower(java.lang.String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value)
Adjusts the given value so that it does not break an existing Min-Power-Constraint.- Parameters:
componentId
- Component-ID of the calling component for the log messageess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
value
- the target value- Returns:
- a value that is compared to existing Min-Power
-
getPidFilter
PidFilter getPidFilter()
Gets the PidFilter instance with the configured P, I and D variables.- Returns:
- an instance of
PidFilter
-
isPidEnabled
boolean isPidEnabled()
Check if PidFilter is enabled.- Returns:
- true if PidFilter is enable, otherwise false
-
-