Skip to content
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

Ipopt options file #3025

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

tymo77
Copy link

@tymo77 tymo77 commented Jul 1, 2021

Addresses issue #3018

Brief summary of changes

  • Add ipopt option to the CasADi solver and tropter solvers in Moco that passes the ipopt options file name to look for.
  • Add example of the use of these external files to 2D walking examples.
  • Ipopt will look for the external options file each time it runs and use it to set advanced solver parameters. See: Ipopt options docs
  • Note: The way things are setup now, using the external options file, one cannot overwrite any settings that are set and compiled in the source code or otherwise set in the source code or script. Ipopt will simply issue a warning:
WARNING: Tried to set option "<option_name>" to a value of "<option_value_in_file>",
         but the previous value is set to disallow clobbering.
         The setting will remain as: "<value_set_in_source_or_script>"

Testing I've completed

  • I have tested it with both solvers in the 2D walking examples.

Looking for feedback on...

  • First PR, so anything about contributing that I have missed.
  • E.g. I don't know how we handle version numbers.

CHANGELOG.md

  • no need to update because this seems like a minor update that is transparent to the user?

This change is Reviewable

Added a property to MocoDirectCollocationSolver for the external options filename.
Set to ipopt's default 'ipopt.opt' by default.
Set both the Tropter solver and the CasADi solver to pass the filename to ipopt.
Note: In order to get the same solver settings after exposing the solver, I had to manually specify them.
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.

None yet

1 participant