Skip to content

[Wave RHO][1/4] Fix Acados control-bound scaling and ordering - #1075

Open
mickaelbegon wants to merge 1 commit into
pyomeca:masterfrom
mickaelbegon:codex/pr-acados-control-bounds
Open

[Wave RHO][1/4] Fix Acados control-bound scaling and ordering#1075
mickaelbegon wants to merge 1 commit into
pyomeca:masterfrom
mickaelbegon:codex/pr-acados-control-bounds

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Note

Wave RHO 1/4 — Draft/WIP. Tracking issue: #1086.

This wave and its decomposition come from an analysis performed by OpenAI Codex. Maintainer review is required before these proposals are considered ready.

Wave RHO context

The overall goal is to upstream generic, application-independent foundations for reliable receding-horizon workflows with IPOPT and Acados: solver-input correctness, supported warm-start grid transfer, explicit window outcomes/diagnostics/hooks, and finally supported solver tuning.

Proposed review/merge order:

  1. [Wave RHO][1/4] Fix Acados control-bound scaling and ordering #1075 — Acados control-bound correctness
  2. [Wave RHO][2/4] Adapt solutions to new initial-guess grids #1073 — solution-to-initial-guess grid adaptation
  3. [Wave RHO][3/4] Preserve receding-horizon outcomes and expose Acados diagnostics #1072 — RHO outcomes, hooks, cyclic shifts, diagnostics, and iterate access
  4. [Wave RHO][4/4] Expose supported advanced Acados options #1074 — advanced Acados options

Role of this PR: correctness foundation for every Acados RHO run.

Interaction: Code-independent from #1073, but both establish the inputs used by the core RHO workflow in #1072.

All four PRs target master independently; this is an interaction/review order, not a stacked Git dependency.

What changed

  • keep generated Acados lbu and ubu in the correct lower/upper order
  • apply Bioptim control scaling both during code generation and numerical window updates
  • centralize bound assembly in one tested helper
  • validate scaled lower bounds do not exceed upper bounds

Root cause

The generation path assigned maximum values to lbu and minimum values to ubu. The update path corrected the order but sent unscaled physical bounds to scaled Acados controls.

Validation

  • pytest -q tests/shard1/test_acados_control_bounds.py
  • 2 passed

This change is Reviewable

@mickaelbegon mickaelbegon changed the title Fix Acados control-bound scaling and ordering [HOLD] Fix Acados control-bound scaling and ordering Jul 22, 2026
@mickaelbegon
mickaelbegon force-pushed the codex/pr-acados-control-bounds branch from 2e09f75 to 9a88e00 Compare July 27, 2026 15:18
@mickaelbegon mickaelbegon changed the title [HOLD] Fix Acados control-bound scaling and ordering [Wave RHO][1/4] Fix Acados control-bound scaling and ordering Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.86%. Comparing base (89c83a3) to head (9a88e00).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
+ Coverage   77.26%   77.86%   +0.60%     
==========================================
  Files         196      197       +1     
  Lines       21506    21504       -2     
==========================================
+ Hits        16616    16744     +128     
+ Misses       4890     4760     -130     
Flag Coverage Δ
unittests 77.86% <100.00%> (+0.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pariterre
pariterre marked this pull request as ready for review July 27, 2026 17:43
@pariterre

Copy link
Copy Markdown
Member

RTM? looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants