feat(python): implement python bindings for all components and solvers
This commit is contained in:
@@ -120,6 +120,8 @@ This document provides the complete epic and story breakdown for Entropyk, decom
|
||||
|
||||
**FR51:** Swappable Calibration Variables - swap calibration factors (f_m, f_ua, f_power, etc.) into solver unknowns and measured values (Tsat, capacity, power) into constraints for one-shot inverse calibration
|
||||
|
||||
**FR52:** Bounded Variable Step Clipping - during Newton-Raphson iterations, bounded control variables are clipped to [min, max] at EVERY iteration, preventing physically impossible values (e.g., valve > 100%) and improving convergence stability
|
||||
|
||||
### NonFunctional Requirements
|
||||
|
||||
**NFR1:** Steady State convergence time < **1 second** for standard cycle in Cold Start
|
||||
@@ -1009,6 +1011,37 @@ This document provides the complete epic and story breakdown for Entropyk, decom
|
||||
|
||||
---
|
||||
|
||||
### Story 5.6: Control Variable Step Clipping in Solver
|
||||
|
||||
**As a** control engineer,
|
||||
**I want** bounded control variables to be clipped at each Newton iteration,
|
||||
**So that** the solver never proposes physically impossible values (e.g., valve > 100%, frequency < min).
|
||||
|
||||
**Context:** Story 5.2 implemented `BoundedVariable` and `clip_step()`, but the Newton-Raphson solver in Story 4.2 doesn't use them. The solver applies `x += delta` without checking bounds, allowing impossible values.
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
**Given** a bounded variable with bounds [min, max]
|
||||
**When** the solver computes a Newton step Δx
|
||||
**Then** the new value is clipped: `x_new = clamp(x + Δx, min, max)`
|
||||
**And** the variable never goes outside bounds during ANY iteration
|
||||
|
||||
**Given** control variables in the state vector at indices [2*edge_count, ...]
|
||||
**When** the solver updates the state vector
|
||||
**Then** bounded variables are clipped
|
||||
**And** regular edge states (P, h) are NOT clipped
|
||||
|
||||
**Given** a converged solution with one or more bounded variables at bounds
|
||||
**When** checking convergence status
|
||||
**Then** `ConvergenceStatus::ControlSaturation` is returned
|
||||
**And** `saturated_variables()` returns the list of saturated variables
|
||||
|
||||
**Given** existing code that doesn't use bounded variables
|
||||
**When** solving
|
||||
**Then** behavior is unchanged (no clipping applied)
|
||||
|
||||
---
|
||||
|
||||
## Epic 6: Multi-Platform APIs
|
||||
|
||||
### Story 6.1: Rust Native API
|
||||
|
||||
Reference in New Issue
Block a user