Class DelayCharge


  • public class DelayCharge
    extends java.lang.Object
    • Method Detail

      • getPredictiveDelayChargeMaxCharge

        protected java.lang.Integer getPredictiveDelayChargeMaxCharge()
                                                               throws OpenemsError.OpenemsNamedException
        Get the maximum active power limit depending on the prediction values.

        Calculates the target minute, when the state of charge should reach 100 percent depending on the predicted production and consumption and limits the charge value of the ESS, to get full at this calculated target minute including a configured buffer.

        Returns:
        Maximum charge power
        Throws:
        OpenemsError.OpenemsNamedException - on error
      • getManualDelayChargeMaxCharge

        protected java.lang.Integer getManualDelayChargeMaxCharge()
                                                           throws OpenemsError.OpenemsNamedException
        Get the maximum active power limit depending the configured target time.

        Limits the charge value of the ESS, to get full at the given target minute.

        Returns:
        Maximum charge power
        Throws:
        OpenemsError.OpenemsNamedException - on error
      • applyCalculatedLimit

        protected void applyCalculatedLimit​(int rawDelayChargeMaxChargePower,
                                            int delayChargeMaxChargePower)
        Apply the calculated power limit as constraint.
        Parameters:
        rawDelayChargeMaxChargePower - raw maximum charge power (Not adapted to DC)
        delayChargeMaxChargePower - maximum power that should be charged by the ESS
        Throws:
        OpenemsException - on error
      • getCalculatedPowerLimit

        public java.lang.Integer getCalculatedPowerLimit​(java.lang.Integer targetMinute)
                                                  throws OpenemsError.OpenemsNamedException
        Calculates the charging power limit for the current cycle.
        Parameters:
        targetMinute - target as minute of the day
        Returns:
        the calculated charging power limit or null if no limit should be applied
        Throws:
        OpenemsError.OpenemsNamedException - on error
      • setDelayChargeStateAndLimit

        protected void setDelayChargeStateAndLimit​(DelayChargeState state,
                                                   java.lang.Integer limit)
        Update the StateMachine and ChargePowerLimit channels.
        Parameters:
        state - the DelayChargeState
        limit - the ChargePowerLimit