Commit 952d5c1
fix: keep shared-tank sources active when operating_hours == 0
Shared-tank members are temperature-driven. Master already exempts them
from the running_lb pinning and the energy constraint, but the
param_load_active activation loop still used `is_thermal = k in
self.param_thermal` only. A shared-tank source is not in param_thermal,
so with operating_hours == 0 (the natural setting for a temperature-driven
load) it was deactivated: p_deferrable[k] forced to 0 for the whole
horizon. With every member off the tank cannot hold its min_temperatures
band, the problem goes infeasible, the relaxed fallback is infeasible too,
and nothing is published.
Same fix for the window-mask path: a member whose configured window falls
entirely outside the horizon had its mask zeroed (same 0-W pin); reset it
to all-ones and warn, since temperature constraints drive the load.
Hoists shared_tank_membership into perform_optimization scope and adds it
to the is_thermal exemption, matching the existing energy-constraint
exemption. Two regression tests reproduce both infeasibility paths and
fail on master without this change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 8e1ffda commit 952d5c1
2 files changed
Lines changed: 106 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3494 | 3494 | | |
3495 | 3495 | | |
3496 | 3496 | | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
3497 | 3501 | | |
3498 | 3502 | | |
3499 | 3503 | | |
| |||
3609 | 3613 | | |
3610 | 3614 | | |
3611 | 3615 | | |
3612 | | - | |
3613 | | - | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
3614 | 3623 | | |
3615 | 3624 | | |
3616 | 3625 | | |
3617 | 3626 | | |
3618 | 3627 | | |
3619 | 3628 | | |
3620 | | - | |
| 3629 | + | |
3621 | 3630 | | |
3622 | 3631 | | |
3623 | 3632 | | |
| |||
3627 | 3636 | | |
3628 | 3637 | | |
3629 | 3638 | | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
3630 | 3653 | | |
3631 | 3654 | | |
3632 | 3655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3403 | 3403 | | |
3404 | 3404 | | |
3405 | 3405 | | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
3406 | 3486 | | |
3407 | 3487 | | |
3408 | 3488 | | |
| |||
0 commit comments