Skip to content

[HOLD] Reject all-points control initial guesses - #1066

Draft
mickaelbegon wants to merge 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-970-control-all-points-validation
Draft

[HOLD] Reject all-points control initial guesses#1066
mickaelbegon wants to merge 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-970-control-all-points-validation

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject InterpolationType.ALL_POINTS for control initial guesses
  • report the unsupported interpolation before optimization-vector construction
  • update the initial-guess regression test for all randomization and phase-dynamics variants

Root cause

NonLinearProgram.update_init validated ALL_POINTS for states and algebraic states but omitted controls. Collocation sub-points exist for state decision variables, not control decision variables, so accepting this interpolation for u_init is ambiguous and can lead to inconsistent dimensions.

Validation

  • MPLCONFIGDIR=/private/tmp/bioptim-mpl-970 python -m pytest tests/shard2/test_global_getting_started.py -k 'test_initial_guesses and ALL_POINTS' -q (4 passed)
  • git diff --check

Closes #970


This change is Reviewable

@mickaelbegon mickaelbegon changed the title Reject all-points control initial guesses [HOLD] Reject all-points control initial guesses Jul 22, 2026
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.

u_init with Interpolation.ALL_POINT doesn't raise an error

1 participant