Search in sources :

Example 1 with UnitTestAsymmetricEssNature

use of io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature in project openems by OpenEMS.

the class ThermalPowerStationTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    ess = new UnitTestAsymmetricEssNature("ess0");
    meter = new UnitTestSymmetricMeterNature("meter0");
    controller = new ThermalPowerStationController();
    outputChannel = new UnitTestWriteChannel<>("0", new Thing() {

        @Override
        public String id() {
            return "output0";
        }

        @Override
        public ThingStateChannels getStateChannel() {
            return null;
        }
    });
    essThingMap = new Ess(ess);
    meterThingMap = new Meter(meter);
    controller.ess.updateValue(essThingMap, true);
    List<Meter> meters = new ArrayList<>();
    meters.add(meterThingMap);
    controller.meters.updateValue(meters, true);
    controller.outputChannelOpt = Optional.of(outputChannel);
    controller.productionLimit.updateValue(1000L, true);
    controller.limitTimeRange.updateValue(1L, true);
    controller.minSoc.updateValue(15L, true);
    controller.maxSoc.updateValue(95L, true);
    controller.invertOutput.updateValue(false, true);
}
Also used : Ess(io.openems.impl.controller.thermalpowerstation.Ess) ThermalPowerStationController(io.openems.impl.controller.thermalpowerstation.ThermalPowerStationController) Meter(io.openems.impl.controller.thermalpowerstation.Meter) ArrayList(java.util.ArrayList) UnitTestAsymmetricEssNature(io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature) UnitTestSymmetricMeterNature(io.openems.test.utils.devicenatures.UnitTestSymmetricMeterNature) Thing(io.openems.api.thing.Thing) BeforeClass(org.junit.BeforeClass)

Example 2 with UnitTestAsymmetricEssNature

use of io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature in project openems by OpenEMS.

the class PhaseRectificationActivePowerTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    ess = new UnitTestAsymmetricEssNature("ess0");
    meter = new UnitTestAsymmetricMeterNature("meter0");
    controller = new PhaseRectificationActivePowerController();
    essThingMap = new Ess(ess);
    meterThingMap = new Meter(meter);
    controller.ess.updateValue(essThingMap, true);
    controller.meter.updateValue(meterThingMap, true);
}
Also used : PhaseRectificationActivePowerController(io.openems.impl.controller.asymmetric.phaserectification.PhaseRectificationActivePowerController) Ess(io.openems.impl.controller.asymmetric.phaserectification.Ess) Meter(io.openems.impl.controller.asymmetric.phaserectification.Meter) UnitTestAsymmetricMeterNature(io.openems.test.utils.devicenatures.UnitTestAsymmetricMeterNature) UnitTestAsymmetricEssNature(io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature) BeforeClass(org.junit.BeforeClass)

Example 3 with UnitTestAsymmetricEssNature

use of io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature in project openems by OpenEMS.

the class AsymmetricPowerTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    ess = new UnitTestAsymmetricEssNature("ess0");
    power = new AsymmetricPower(ess.allowedDischarge(), ess.allowedCharge(), ess.allowedApparent(), ess.setActivePowerL1(), ess.setActivePowerL2(), ess.setActivePowerL3(), ess.setReactivePowerL1(), ess.setReactivePowerL2(), ess.setReactivePowerL3());
}
Also used : AsymmetricPower(io.openems.core.utilities.AsymmetricPower) UnitTestAsymmetricEssNature(io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature) BeforeClass(org.junit.BeforeClass)

Aggregations

UnitTestAsymmetricEssNature (io.openems.test.utils.devicenatures.UnitTestAsymmetricEssNature)3 BeforeClass (org.junit.BeforeClass)3 Thing (io.openems.api.thing.Thing)1 AsymmetricPower (io.openems.core.utilities.AsymmetricPower)1 Ess (io.openems.impl.controller.asymmetric.phaserectification.Ess)1 Meter (io.openems.impl.controller.asymmetric.phaserectification.Meter)1 PhaseRectificationActivePowerController (io.openems.impl.controller.asymmetric.phaserectification.PhaseRectificationActivePowerController)1 Ess (io.openems.impl.controller.thermalpowerstation.Ess)1 Meter (io.openems.impl.controller.thermalpowerstation.Meter)1 ThermalPowerStationController (io.openems.impl.controller.thermalpowerstation.ThermalPowerStationController)1 UnitTestAsymmetricMeterNature (io.openems.test.utils.devicenatures.UnitTestAsymmetricMeterNature)1 UnitTestSymmetricMeterNature (io.openems.test.utils.devicenatures.UnitTestSymmetricMeterNature)1 ArrayList (java.util.ArrayList)1