@Test public void testMinimumlValue() { assertEquals(0, l1.minimumValue(network, LOAD), 0.); assertEquals(-100, l3.minimumValue(network), 0.); assertEquals(-100, l3.minimumValue(network, GENERATOR), 0.); assertEquals(20, l3.minimumValue(network, LOAD), 0.); }
@Override public double minimumValue(Network n, ScalingConvention scalingConvention) { Objects.requireNonNull(n); Objects.requireNonNull(scalingConvention); Load l = n.getLoad(id); if (l != null) { return scalingConvention == LOAD ? minValue : -maxValue; } else { return 0; } }
LoadScalable extends AbstractInjectionScalable { @Override public double minimumValue(Network n, ScalingConvention scalingConvention) { Objects.requireNonNull(n); Objects.requireNonNull(scalingConvention); Load l = n.getLoad(id); if (l != null) { return scalingConvention == LOAD ? minValue : -maxValue; } else { return 0; } } }
LoadScalable extends AbstractInjectionScalable { @Override public double minimumValue(Network n, ScalingConvention scalingConvention) { Objects.requireNonNull(n); Objects.requireNonNull(scalingConvention); Load l = n.getLoad(id); if (l != null) { return scalingConvention == LOAD ? minValue : -maxValue; } else { return 0; } } LoadScalable(String id);   LoadScalable(String id, double maxValue);   LoadScalable(String id, double minValue, double maxValue); }
LoadScalable extends AbstractInjectionScalable { @Override public double minimumValue(Network n, ScalingConvention scalingConvention) { Objects.requireNonNull(n); Objects.requireNonNull(scalingConvention); Load l = n.getLoad(id); if (l != null) { return scalingConvention == LOAD ? minValue : -maxValue; } else { return 0; } } LoadScalable(String id);   LoadScalable(String id, double maxValue);   LoadScalable(String id, double minValue, double maxValue); @Override void reset(Network n); @Override double maximumValue(Network n, ScalingConvention scalingConvention); @Override double minimumValue(Network n, ScalingConvention scalingConvention); @Override void filterInjections(Network n, List<Injection> injections, List<String> notFoundInjections); @Override double scale(Network n, double asked, ScalingConvention scalingConvention); }
LoadScalable extends AbstractInjectionScalable { @Override public double minimumValue(Network n, ScalingConvention scalingConvention) { Objects.requireNonNull(n); Objects.requireNonNull(scalingConvention); Load l = n.getLoad(id); if (l != null) { return scalingConvention == LOAD ? minValue : -maxValue; } else { return 0; } } LoadScalable(String id);   LoadScalable(String id, double maxValue);   LoadScalable(String id, double minValue, double maxValue); @Override void reset(Network n); @Override double maximumValue(Network n, ScalingConvention scalingConvention); @Override double minimumValue(Network n, ScalingConvention scalingConvention); @Override void filterInjections(Network n, List<Injection> injections, List<String> notFoundInjections); @Override double scale(Network n, double asked, ScalingConvention scalingConvention);  }