EV-10b review: pin the done-part clip and the car's power now in test_ev10b
Two checks a mutant survived: crediting the car-made export in the done part, and taking off the car's quarter average instead of its power now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b12776c705
commit
ff2eebe28b
@@ -122,6 +122,24 @@ c._carq["ws"] = 11040.0 * 30
|
||||
check("house 7 kW alone (batteries 8.1 kW, car 11 kW): the house misses the aim",
|
||||
lands(c.car_exclude_alarm(proj(7000 + 11040 - 8100, 30.0), 11040.0),
|
||||
8100.0))
|
||||
# review: the done part is clipped at 0 Ws. Rig shape for 400 s (grid 5940 W),
|
||||
# then the batteries at the reserve and the house at 12 kW: the house alone
|
||||
# lands 6667 W. Crediting the car-made export (-5100 W x 400 s) would hide it.
|
||||
c._carq["ws"] = 11040.0 * 400
|
||||
held = 12000.0 + 11040.0
|
||||
check("the car's battery share earlier is not credited against a later house "
|
||||
"overload (done part clipped at 0 Ws)",
|
||||
lands(c.car_exclude_alarm(
|
||||
proj((5940.0 * 400 + held * 500) / 900, 400.0, held), 11040.0), 0.0))
|
||||
# review: the rest of the period takes off the car's power NOW, not its
|
||||
# quarter average. Car 11 kW for 500 s, then 1.4 kW; house 7 kW, no batteries.
|
||||
c._carq["ws"] = 11040.0 * 500 + 1380.0 * 100
|
||||
held = 7000.0 + 1380.0
|
||||
check("a car turned down mid-quarter: the rest takes off its power now, so "
|
||||
"the house alone (7 kW) still misses the aim",
|
||||
lands(c.car_exclude_alarm(
|
||||
proj(((7000 + 11040) * 500 + held * 100 + held * 300) / 900, 600.0,
|
||||
held), 1380.0), 0.0))
|
||||
# with the batteries giving less than the house the two agree where the old
|
||||
# clip did not bite
|
||||
p = proj(3000 + 3700 - 300, 300.0)
|
||||
|
||||
Reference in New Issue
Block a user