feat(manager): Batteriesollwert aus Netzfahrplan anwenden
Tests / test (push) Successful in 47s

This commit is contained in:
dh
2026-09-29 17:23:25 +00:00
parent f611da975d
commit 53fca5e2bb
3 changed files with 90 additions and 8 deletions
+23
View File
@@ -333,6 +333,29 @@ final class ManagerReglerTest extends TestCase
self::assertSame(-3000, $ergebnis['Restabweichung_W']);
}
public function testExpliziterBatteriefahrplanBleibtVonAnderenVerbrauchernUnveraendert(): void
{
$ergebnis = ManagerRegler::verteile(
0.0,
1000.0,
[
$this->verbraucher(
10,
0,
[['Von_W' => -5000, 'Bis_W' => 5000]],
0
),
$this->verbraucher(20, 1, [0, 3000], 0),
],
'PrioritaetPV',
[],
[10 => 1000]
);
self::assertSame([10 => 1000, 20 => 0], $ergebnis['Sollwerte']);
self::assertSame(0, $ergebnis['Restabweichung_W']);
}
public function testMonatlicheGrenzeMussVollstaendigSein(): void
{
$this->expectException(InvalidArgumentException::class);