Package io.openems.edge.ess.power.api
Interface Power
- All Known Subinterfaces:
EssPower
- All Known Implementing Classes:
DummyPower
,EssPowerImpl
public interface Power
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddConstraint
(Constraint constraint) Adds a Constraint.addConstraintAndValidate
(Constraint constraint) Adds a Constraint if the problem is still solvable afterwards.createSimpleConstraint
(String description, ManagedSymmetricEss ess, Phase phase, Pwr pwr, Relationship relationship, double value) Creates a simple constraint.default int
fitValueIntoMinMaxPower
(String componentId, ManagedSymmetricEss ess, Phase phase, Pwr pwr, int value) Adjusts the given value so that it fits into Min/MaxPower.default int
fitValueToMaxPower
(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
(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.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.Gets the PidFilter instance with the configured P, I and D variables.boolean
Check if PidFilter is enabled.void
removeConstraint
(Constraint constraint) Removes a Constraint.
-
Field Details
-
log
static final org.slf4j.Logger log -
NO_CONSTRAINTS
-
-
Method Details
-
addConstraint
Adds a Constraint.- Parameters:
constraint
- theConstraint
- Returns:
- the
Constraint
-
addConstraintAndValidate
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(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
Removes a Constraint.- Parameters:
constraint
- theConstraint
-
getMaxPower
Gets the maximum possible Power under the active Constraints.- Parameters:
ess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
- Returns:
- the maximum possible power
-
getMinPower
Gets the minimum possible possible Power under the active Constraints.- Parameters:
ess
- theManagedSymmetricEss
phase
- thePhase
pwr
- thePwr
- Returns:
- the minimum possible power
-
getCoefficient
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(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(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(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
-