@Test public void testRegulationCapacity () { RegulationAccumulator rc = new RegulationAccumulator(1.0, -2.0); assertEquals(1.0, rc.getUpRegulationCapacity(),1e-6, "correct up-regulation"); assertEquals(-2.0, rc.getDownRegulationCapacity(), 1e-6, "correct down-regulation"); }
public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0.0"); upRegulationCapacity = 0.0; } if (downRegulationCapacity > 0.0) { if (downRegulationCapacity > epsilon) log.warn("downRegulationCapacity " + downRegulationCapacity + " > 0.0"); downRegulationCapacity = 0.0; } this.upRegulationCapacity = upRegulationCapacity; this.downRegulationCapacity = downRegulationCapacity; }
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0.0"); upRegulationCapacity = 0.0; } if (downRegulationCapacity > 0.0) { if (downRegulationCapacity > epsilon) log.warn("downRegulationCapacity " + downRegulationCapacity + " > 0.0"); downRegulationCapacity = 0.0; } this.upRegulationCapacity = upRegulationCapacity; this.downRegulationCapacity = downRegulationCapacity; } }
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0.0"); upRegulationCapacity = 0.0; } if (downRegulationCapacity > 0.0) { if (downRegulationCapacity > epsilon) log.warn("downRegulationCapacity " + downRegulationCapacity + " > 0.0"); downRegulationCapacity = 0.0; } this.upRegulationCapacity = upRegulationCapacity; this.downRegulationCapacity = downRegulationCapacity; } RegulationCapacity(TariffSubscription subscription,
                             double upRegulationCapacity,
                             double downRegulationCapacity);  RegulationCapacity(); }
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0.0"); upRegulationCapacity = 0.0; } if (downRegulationCapacity > 0.0) { if (downRegulationCapacity > epsilon) log.warn("downRegulationCapacity " + downRegulationCapacity + " > 0.0"); downRegulationCapacity = 0.0; } this.upRegulationCapacity = upRegulationCapacity; this.downRegulationCapacity = downRegulationCapacity; } RegulationCapacity(TariffSubscription subscription,
                             double upRegulationCapacity,
                             double downRegulationCapacity);  RegulationCapacity(); long getId(); TariffSubscription getSubscription(); double getUpRegulationCapacity(); double getDownRegulationCapacity(); }
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0.0"); upRegulationCapacity = 0.0; } if (downRegulationCapacity > 0.0) { if (downRegulationCapacity > epsilon) log.warn("downRegulationCapacity " + downRegulationCapacity + " > 0.0"); downRegulationCapacity = 0.0; } this.upRegulationCapacity = upRegulationCapacity; this.downRegulationCapacity = downRegulationCapacity; } RegulationCapacity(TariffSubscription subscription,
                             double upRegulationCapacity,
                             double downRegulationCapacity);  RegulationCapacity(); long getId(); TariffSubscription getSubscription(); double getUpRegulationCapacity(); double getDownRegulationCapacity();  }