Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/shared-storage-direct-highs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"ftw": patch
---

The optional optimizer now uses highspy instead of CVXPY by default for
eligible shared storage plans, sending a sparse linear model straight to
HiGHS. It keeps the same shared-action constraints, service-first solve,
scenario risk cost and replay checks as the CVXPY model. It checks meter flow
against the post-curtailment baseline and retries an exact mixed-integer HiGHS
model within the same time budget when a relaxed candidate crosses import and
export. Auto mode uses this path only for continuous, cycle-safe HIGHS requests
with storage alone; commercial constraints, flexible loads, thermal loads,
guarded tariffs and direct-solver failures stay on CVXPY.
3 changes: 2 additions & 1 deletion go/internal/mpc/external_optimizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ func TestExternalOptimizerEndToEnd(t *testing.T) {
if err != nil {
t.Fatalf("Optimize: %v", err)
}
if plan.Solver == nil || plan.Solver.Engine != "cvxpy" || plan.Solver.Backend != "highs" {
if plan.Solver == nil || plan.Solver.Engine != "highspy" || plan.Solver.Backend != "highs" ||
plan.Solver.ScenarioPolicy != "shared" || plan.Solver.PolicyVersion != "shared-v1" {
t.Fatalf("unexpected solver metadata: %+v", plan.Solver)
}
if plan.Actions[0].BatteryW <= 0 || plan.Actions[1].BatteryW >= 0 {
Expand Down
Loading