Search in sources :

Example 1 with Ess

use of io.openems.impl.controller.symmetric.balancingcosphi.Ess in project openems by OpenEMS.

the class CosPhiController method run.

/*
	 * Methods
	 */
@Override
public void run() {
    try {
        Ess ess = this.ess.value();
        ess.limit.setCosPhi(cosPhi.valueOptional().orElse(null), capacitive.valueOptional().orElse(null), 0L, 0L);
        ess.power.applyLimitation(ess.limit);
    } catch (InvalidValueException e) {
        log.error("No ess found.", e);
    } catch (PowerException e) {
        log.error("Failed to set Power!", e);
    }
}
Also used : InvalidValueException(io.openems.api.exception.InvalidValueException) Ess(io.openems.impl.controller.symmetric.balancingcosphi.Ess) PowerException(io.openems.core.utilities.power.symmetric.PowerException)

Aggregations

InvalidValueException (io.openems.api.exception.InvalidValueException)1 PowerException (io.openems.core.utilities.power.symmetric.PowerException)1 Ess (io.openems.impl.controller.symmetric.balancingcosphi.Ess)1