Skip to content

fix: fix bad input ordering, make downstream tests pass #3804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 14, 2025

Conversation

AayushSabharwal
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

AayushSabharwal and others added 3 commits July 11, 2025 14:43
@@ -670,6 +672,12 @@ function complete(
end
ordered_ps = vcat(
ordered_ps, reduce(vcat, ps_split; init = eltype(ordered_ps)[]))
if isscheduled(sys)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand where the fix to the ordering happens. Will this assert @assert issorted(input_idxs) guarantee that the order expected by the inputs when they are passed as input arguments to generated control functions is the same as the order specified by the user?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix to ordering is in the IndexCache constructor - that was the problem all along. This check here just enforces the invariant.

@ChrisRackauckas
Copy link
Member

Disable CASADI for LTS? And is there a standard library release we need to do?

@ChrisRackauckas ChrisRackauckas merged commit bbc1cbc into SciML:master Jul 14, 2025
45 of 50 checks passed
@AayushSabharwal AayushSabharwal deleted the as/control-and-error branch July 15, 2025 06:07
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.

3 participants