Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add collocation method for optimal control problems#799

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

murrayrm
Copy link
Member

@murrayrmmurrayrm commentedNov 26, 2022
edited
Loading

This PR changes the default way that optimal control problems are solved from using a shooting method to using collocation. This results in more robust (and faster) solutions, especially for trajectory generation for unstable or marginally stable systems (where shooting is very sensitive to small parameter variations).

The following new functionality is included:

  • Thesolve_ocp() function andOptimalControlProblem class have new parameterstrajectory_method that be set to eithershooting (default for discrete time systems) orcollocation (default for continuous time systems).
  • When collocation is used, theinitial_guess parameter can either be an input trajectory (as before) or a tuple consisting of a state trajectory and an input trajectory.
  • Constraints can now be specified in the formLinearConstraint(A, lb, ub) orNonlinearConstraint(fun, lb, ub) instead of the previous forms(LinearConstraint, A, lb, ub) and(NonlinearConstraint, fun, lb, ub). The legacy format is still supported.
  • The documentation (docstrings and manual) have been updated to reflect the new functionality.
  • New unit tests are included that tease out the functionality of the various possibilities.
  • Benchmarks comparing shooting and collocation have been added.

This PR also addresses issue#782 (see also discussion in#781) which were showing some of the weakness of the shooting methodology.

@coveralls
Copy link

coveralls commentedNov 26, 2022
edited
Loading

Coverage Status

Coverage decreased (-0.03%) to 94.803% when pullingdd5e42d on murrayrm:fix_horizon-19Nov2022 into4d89991 on python-control:main.

@murrayrmmurrayrm added this to the0.9.3 milestoneNov 27, 2022
@sawyerbfuller
Copy link
Contributor

LGTM

@murrayrm
Copy link
MemberAuthor

Updated the initial post to reflect the additional commits, so that we don't lose track of the changes.

@murrayrmmurrayrm merged commit9d65bf8 intopython-control:mainDec 2, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.3
Development

Successfully merging this pull request may close these issues.

About the "horizon" parameter in the solve_ocp() method
3 participants
@murrayrm@coveralls@sawyerbfuller

[8]ページ先頭

©2009-2025 Movatter.jp