Generated: 2026-02-22 11:01:44
Instead of specifying inputs and computing outputs (forward simulation), inverse control specifies desired outputs and computes the required inputs automatically.
For a well-posed system, the number of equations must equal the number of unknowns:
Equations = Unknowns
SOLVABLEEquations > Unknowns
ERROREquations < Unknowns
WARNING| Component | Count | Contribution |
|---|---|---|
| Edges | 4 | 2 × 4 = 8 unknowns (P, h) |
| Components | 4 | 8 equations (2 per component) |
| Constraints | 1 | +1 equation |
| Control Variables | 1 | +1 unknown |
| Total | 9 equations = 9 unknowns ✓ |
Create a constraint specifying the desired output:
Create a bounded variable with physical limits:
Register constraint and control variable:
Establish the One-Shot relationship:
Ensure the system is well-posed:
| Method | Description |
|---|---|
add_constraint() |
Add a constraint to the system |
add_bounded_variable() |
Add a bounded control variable |
link_constraint_to_control() |
Link constraint to control for One-Shot solving |
unlink_constraint() |
Remove constraint-control linkage |
validate_inverse_control_dof() |
Validate degrees of freedom |
control_variable_state_index() |
Get state vector index for control variable |
full_state_vector_len() |
Total state length including controls |
compute_constraint_residuals() |
Compute residuals for all constraints |
compute_inverse_control_jacobian() |
Jacobian entries for ∂constraint/∂control |
| Edge Unknowns (P, h) | 8 |
| Control Variables | +1 |
| Total Unknowns | 9 |
| Component Equations | 8 |
| Constraint Equations | +1 |
| Total Equations | 9 |
| Balance | ✓ Balanced |
| Variable ID | valve_position |
| Initial Value | 50% |
| Final Value | 38% |
| Bounds | [10%, 100%] |
| Saturated | No |
| State Index | 8 (after edge states) |