use of io.openems.test.utils.devicenatures.UnitTestSymmetricMeterNature 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);
}
use of io.openems.test.utils.devicenatures.UnitTestSymmetricMeterNature 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);
}
Aggregations