Skip to content

Conversation

@franckgaga
Copy link
Member

ControllerConstraint{NT} is no longer concrete
ControllerConstraint{NT, GCfunc} is

`ControllerConstraint{NT}` is no longer concrete
`ControllerConstraint{NT, GCfunc}` is
@franckgaga
Copy link
Member Author

franckgaga commented Nov 29, 2024

oh well it happens!

I will work on that a little bit tomorrow. But I have a party on Saturday. so not Saturday. And not Sunday while we're at it XD

🎉 🎉 🎉
🍰 🍰 🍰
🎁 🎁 🎁

@baggepinnen
Copy link
Member

baggepinnen commented Nov 29, 2024

It's a common pitfall. Ways to protect yourself against future such changes are

  • Test type stability using JET.jl in the tests, e.g., like is done for LowLevelParticleFilters.jl and DiscretePIDs.jl
  • Use a type parameter for the entire field, i.e., con::T instead of con::ControllerConstraint{NT, GCfunc}

@franckgaga
Copy link
Member Author

franckgaga commented Nov 29, 2024

Yeah I'll implement your second option instead.

I did not know that JET.jl was able to do that. Great idea!

@franckgaga franckgaga changed the title Fix type instability in LinMPC and NonLinMPC (introduced in 1.2.0) Fix type instability in LinMPC and NonLinMPC (introduced in 1.1.0) Nov 29, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.99%. Comparing base (f37e9bb) to head (887bcb2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
- Coverage   98.99%   98.99%   -0.01%     
==========================================
  Files          24       24              
  Lines        3676     3675       -1     
==========================================
- Hits         3639     3638       -1     
  Misses         37       37              

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

@franckgaga franckgaga merged commit a934f8e into main Dec 3, 2024
4 checks passed
@franckgaga franckgaga deleted the fix_type_instability branch December 3, 2024 20:22
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.

4 participants