Class AbstractAllowedChargeDischargeHandler<ESS extends SymmetricEss & CycleProvider>
java.lang.Object
io.openems.edge.ess.generic.common.AbstractAllowedChargeDischargeHandler<ESS>
- All Implemented Interfaces:
org.apache.logging.log4j.util.TriConsumer<ClockProvider,
Battery, SymmetricBatteryInverter>
- Direct Known Subclasses:
AllowedChargeDischargeHandler
,AllowedChargeDischargeHandler
public abstract class AbstractAllowedChargeDischargeHandler<ESS extends SymmetricEss & CycleProvider>
extends Object
implements org.apache.logging.log4j.util.TriConsumer<ClockProvider,Battery,SymmetricBatteryInverter>
Helper class to handle calculation of Allowed-Charge-Power and
Allowed-Discharge-Power. This class is used by
ChannelManager
as a
callback to updates of Battery Channels.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
protected float
protected float
static final float
Allow a maximum increase per second.protected final ESS
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
accept
(ClockProvider clockProvider, Battery battery, SymmetricBatteryInverter inverter) protected void
calculateAllowedChargeDischargePower
(ClockProvider clockProvider, boolean isStarted, Integer chargeMaxCurrent, Integer dischargeMaxCurrent, Integer voltage) Calculates Allowed-Charge-Power and Allowed-Discharge Power from the given parameters.protected void
calculateAllowedChargeDischargePower
(ClockProvider clockProvider, Battery battery, SymmetricBatteryInverter inverter) Calculates Allowed-Charge-Power and Allowed-Discharge Power from the given parameters.
-
Field Details
-
DISCHARGE_EFFICIENCY_FACTOR
public static final float DISCHARGE_EFFICIENCY_FACTOR- See Also:
-
MAX_INCREASE_PERCENTAGE
public static final float MAX_INCREASE_PERCENTAGEAllow a maximum increase per second.5 % of possible allowed charge/discharge power
- See Also:
-
VOLTAGE_CONTROL_FILTER_TIME_CONSTANT
public static final int VOLTAGE_CONTROL_FILTER_TIME_CONSTANT- See Also:
-
VOLTAGE_CONTROL_OFFSET
public static final int VOLTAGE_CONTROL_OFFSET- See Also:
-
parent
-
lastBatteryAllowedChargePower
protected float lastBatteryAllowedChargePower -
lastBatteryAllowedDischargePower
protected float lastBatteryAllowedDischargePower
-
-
Constructor Details
-
AbstractAllowedChargeDischargeHandler
-
-
Method Details
-
accept
public abstract void accept(ClockProvider clockProvider, Battery battery, SymmetricBatteryInverter inverter) - Specified by:
accept
in interfaceorg.apache.logging.log4j.util.TriConsumer<ClockProvider,
Battery, SymmetricBatteryInverter>
-
calculateAllowedChargeDischargePower
protected void calculateAllowedChargeDischargePower(ClockProvider clockProvider, Battery battery, SymmetricBatteryInverter inverter) Calculates Allowed-Charge-Power and Allowed-Discharge Power from the given parameters. Result is stored in 'lastBatteryAllowedChargePower' and 'lastBatteryAllowedDischargePower' variables - both as positive values!- Parameters:
clockProvider
- theClockProvider
battery
- theBattery
inverter
- theSymmetricBatteryInverter
-
calculateAllowedChargeDischargePower
protected void calculateAllowedChargeDischargePower(ClockProvider clockProvider, boolean isStarted, Integer chargeMaxCurrent, Integer dischargeMaxCurrent, Integer voltage) Calculates Allowed-Charge-Power and Allowed-Discharge Power from the given parameters. Result is stored in 'allowedChargePower' and 'allowedDischargePower' variables - both as positive values!- Parameters:
clockProvider
- theClockProvider
isStarted
- is the ESS started?chargeMaxCurrent
- theBattery.ChannelId.CHARGE_MAX_CURRENT
dischargeMaxCurrent
- theBattery.ChannelId.DISCHARGE_MAX_CURRENT
voltage
- theBattery.ChannelId.VOLTAGE
-