pyomeca / bioptim

An optimization framework that links CasADi, Ipopt, ACADOS and biorbd for Optimal Control Problem
MIT License
92 stars 46 forks source link

[RTR] Fix sol.integrate shooting.single continuity #859

Closed Kev1CO closed 7 months ago

Kev1CO commented 8 months ago

All Submissions:

New Feature Submissions:

  1. [ ] Does your submission pass the tests (if not please explain why this is intended)?
  2. [ ] Did you write a proper documentation (docstrings and ReadMe)
  3. [ ] Have you linted your code locally prior to submission (using the command: black . -l120 --exclude "external/*")?

Changes to Core Features:


This change is Reviewable

Kev1CO commented 8 months ago

Last blocking tests are the dimension comparation between states from sol.integrate and time from sol.stepwise_time because sol.stepwise_time as still redundant nodes compared to sol.integrate states. Should I give an argument to sol.stepwise_time(remove_redundant=True) and adjust the dimension here or in the tests compare time and states from sol.integrate(return_time=True)?

Kev1CO commented 7 months ago

Do not know how to fix last failed tests

Kev1CO commented 7 months ago

When returning time sol.integrate(return_time=True), should the time vector be concatenated in one array (array([0, 0.1, 0.2])) instead of keeping its initial shape of array([[0], [0.1], [0.2]])

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 82.85714% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 78.50%. Comparing base (7494252) to head (4cda59c). Report is 100 commits behind head on master.

Files Patch % Lines
bioptim/optimization/solution/solution.py 82.85% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #859 +/- ## ========================================== + Coverage 78.25% 78.50% +0.25% ========================================== Files 139 141 +2 Lines 16228 16309 +81 ========================================== + Hits 12699 12804 +105 + Misses 3529 3505 -24 ``` | [Flag](https://app.codecov.io/gh/pyomeca/bioptim/pull/859/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyomeca) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/pyomeca/bioptim/pull/859/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyomeca) | `78.50% <82.85%> (+0.25%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyomeca#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.