Package io.openems.edge.evcs.cluster
Class EvcsClusterPeakShavingImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.evcs.cluster.EvcsClusterPeakShavingImpl
- All Implemented Interfaces:
OpenemsComponent
,Controller
,Evcs
,MetaEvcs
,EvcsClusterPeakShaving
,org.osgi.service.event.EventHandler
public class EvcsClusterPeakShavingImpl
extends AbstractOpenemsComponent
implements MetaEvcs, OpenemsComponent, Evcs, org.osgi.service.event.EventHandler, EvcsClusterPeakShaving, Controller
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.controller.api.Controller
Controller.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.evcs.api.Evcs
Evcs.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.evcs.cluster.EvcsClusterPeakShaving
EvcsClusterPeakShaving.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Field Summary
Fields inherited from interface io.openems.edge.evcs.api.Evcs
DEFAULT_MAXIMUM_HARDWARE_CURRENT, DEFAULT_MAXIMUM_HARDWARE_POWER, DEFAULT_MINIMUM_HARDWARE_CURRENT, DEFAULT_MINIMUM_HARDWARE_POWER, DEFAULT_POWER_RECISION, DEFAULT_VOLTAGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
Handles @Deactivate of implementations.int
Maximum available grid power.int
Maximum power to distribute.Sorted list of the EVCSs in the cluster.void
handleEvent
(org.osgi.service.event.Event event) protected void
Depending on the excess power, the EVCSs will be charged.protected void
logInfoInDebugmode
(org.slf4j.Logger log, String string) protected void
removeEvcs
(Evcs evcs) void
run()
Executes the Controller logic.Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.controller.api.Controller
_setRunFailed, getRunFailed, getRunFailedChannel
Methods inherited from interface io.openems.edge.evcs.api.Evcs
_setActiveConsumptionEnergy, _setActiveConsumptionEnergy, _setChargePower, _setChargePower, _setChargingstationCommunicationFailed, _setChargingType, _setEnergySession, _setEnergySession, _setFixedMaximumHardwarePower, _setFixedMaximumHardwarePower, _setFixedMinimumHardwarePower, _setFixedMinimumHardwarePower, _setMaximumPower, _setMaximumPower, _setMinimumPower, _setMinimumPower, _setPhases, _setPhases, _setStatus, getActiveConsumptionEnergy, getActiveConsumptionEnergyChannel, getChargePower, getChargePowerChannel, getChargingstationCommunicationFailed, getChargingstationCommunicationFailedChannel, getChargingType, getChargingTypeChannel, getEnergySession, getEnergySessionChannel, getFixedMaximumHardwarePower, getFixedMaximumHardwarePowerChannel, getFixedMinimumHardwarePower, getFixedMinimumHardwarePowerChannel, getMaximumHardwarePower, getMaximumHardwarePowerChannel, getMaximumPower, getMaximumPowerChannel, getMinimumHardwarePower, getMinimumHardwarePowerChannel, getMinimumPower, getMinimumPowerChannel, getPhases, getPhasesAsInt, getPhasesChannel, getStatus, getStatusChannel
Methods inherited from interface io.openems.edge.evcs.cluster.EvcsClusterPeakShaving
_setEvcsBlockedChargePower, _setEvcsBlockedChargePower, _setEvcsClusterStatus, getEvcsBlockedChargePower, getEvcsBlockedChargePowerChannel, getEvcsClusterStatus, getEvcsClusterStatusChannel
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Constructor Details
-
EvcsClusterPeakShavingImpl
public EvcsClusterPeakShavingImpl()
-
-
Method Details
-
addEvcs
-
removeEvcs
-
deactivate
protected void deactivate()Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event) - Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
limitEvcss
protected void limitEvcss()Depending on the excess power, the EVCSs will be charged. Distributing the maximum allowed charge distribution power (given by the implementation) to each evcs. -
getSortedEvcss
Sorted list of the EVCSs in the cluster.List of EVCSs that should be considered in the cluster sorted by prioritisation.
- Returns:
- Sorted EVCS list
-
getMaximumPowerToDistribute
public int getMaximumPowerToDistribute()Maximum power to distribute.Calculate the maximum power to distribute, like excess power or excess power + storage.
- Returns:
- Maximum Power in Watt
-
getAvailableGridPower
public int getAvailableGridPower()Maximum available grid power.Calculate the maximum available power from the grid. This value is used as a fallback option when it becomes negative.
- Returns:
- Current grid power in W
-
logInfoInDebugmode
-
run
Description copied from interface:Controller
Executes the Controller logic.- Specified by:
run
in interfaceController
- Throws:
OpenemsError.OpenemsNamedException
- on error
-