Search in sources :

Example 1 with UnitTestSymmetricEssNature

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

the class SupplyBusTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    HashMap<Ess, WriteChannel<Boolean>> essSet = new HashMap<>();
    ess1 = new UnitTestSymmetricEssNature("ess0");
    essMap1 = new Ess(ess1);
    output1 = new UnitTestWriteChannel<>("output", "0");
    essSet.put(essMap1, output1);
    ess2 = new UnitTestSymmetricEssNature("ess1");
    essMap2 = new Ess(ess2);
    output2 = new UnitTestWriteChannel<>("output", "1");
    essSet.put(essMap2, output2);
    ess3 = new UnitTestSymmetricEssNature("ess2");
    essMap3 = new Ess(ess3);
    output3 = new UnitTestWriteChannel<>("output", "2");
    essSet.put(essMap3, output3);
    ess4 = new UnitTestSymmetricEssNature("ess3");
    essMap4 = new Ess(ess4);
    output4 = new UnitTestWriteChannel<>("output", "3");
    essSet.put(essMap4, output4);
    sbOnIndication = new UnitTestWriteChannel<>("custom", "sb1On");
    sb = new Supplybus(essSet, "sb1", essMap1, 1000L, sbOnIndication, new ArrayList<>());
}
Also used : Ess(io.openems.impl.controller.supplybusswitch.Ess) HashMap(java.util.HashMap) WriteChannel(io.openems.api.channel.WriteChannel) UnitTestWriteChannel(io.openems.test.utils.channel.UnitTestWriteChannel) ArrayList(java.util.ArrayList) UnitTestSymmetricEssNature(io.openems.test.utils.devicenatures.UnitTestSymmetricEssNature) Supplybus(io.openems.impl.controller.supplybusswitch.Supplybus) BeforeClass(org.junit.BeforeClass)

Example 2 with UnitTestSymmetricEssNature

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

the class BalancingTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    ess = new UnitTestSymmetricEssNature("ess0");
    meter = new UnitTestSymmetricMeterNature("meter0");
    controller = new BalancingController();
    essThingMap = new Ess(ess);
    meterThingMap = new Meter(meter);
    List<Ess> essSet = new ArrayList<Ess>();
    essSet.add(essThingMap);
    controller.esss.updateValue(essSet, true);
    controller.meter.updateValue(meterThingMap, true);
}
Also used : BalancingController(io.openems.impl.controller.symmetric.balancing.BalancingController) Ess(io.openems.impl.controller.symmetric.balancing.Ess) Meter(io.openems.impl.controller.symmetric.balancing.Meter) ArrayList(java.util.ArrayList) UnitTestSymmetricEssNature(io.openems.test.utils.devicenatures.UnitTestSymmetricEssNature) UnitTestSymmetricMeterNature(io.openems.test.utils.devicenatures.UnitTestSymmetricMeterNature) BeforeClass(org.junit.BeforeClass)

Aggregations

UnitTestSymmetricEssNature (io.openems.test.utils.devicenatures.UnitTestSymmetricEssNature)2 ArrayList (java.util.ArrayList)2 BeforeClass (org.junit.BeforeClass)2 WriteChannel (io.openems.api.channel.WriteChannel)1 Ess (io.openems.impl.controller.supplybusswitch.Ess)1 Supplybus (io.openems.impl.controller.supplybusswitch.Supplybus)1 BalancingController (io.openems.impl.controller.symmetric.balancing.BalancingController)1 Ess (io.openems.impl.controller.symmetric.balancing.Ess)1 Meter (io.openems.impl.controller.symmetric.balancing.Meter)1 UnitTestWriteChannel (io.openems.test.utils.channel.UnitTestWriteChannel)1 UnitTestSymmetricMeterNature (io.openems.test.utils.devicenatures.UnitTestSymmetricMeterNature)1 HashMap (java.util.HashMap)1