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

MATLAB interface for Manual external cost in C #634

Merged
merged 10 commits into from Oct 19, 2020

Conversation

mindThomas
Copy link
Contributor

Updated MATLAB interface to add support for custom external C files for the cost.
Cost function names are source files are manually specified and compiled and linked during the solver compilation step.

@mindThomas mindThomas force-pushed the manual_external_cost_matlab branch 2 times, most recently from 13ea662 to 399c6a9 Compare September 5, 2020 10:27
@mindThomas mindThomas changed the title Manual external cost matlab MATLAB interface for Manual external cost in C Sep 5, 2020
@mindThomas
Copy link
Contributor Author

Hey @FreyJo
Take a look again now. I did some modifications to get rid of the multiple C files at once.
Furthermore I also found a few bugs, including the one in generate_c_code_ext_cost.m and I also added support for a mix of Casadi and generic cost (e.g. the terminal cost being supplied as Casadi while the general stage cost is supplied as a generic C function).

Copy link
Member

@FreyJo FreyJo left a comment

Choose a reason for hiding this comment

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

Hey @mindThomas ,
I had a closer look.
Thanks for the bug fixes!
I would suggest you merge these changes mindThomas#3
then maybe @giaf has another look, and we merge this PR here.

interfaces/acados_matlab_octave/acados_ocp.m Show resolved Hide resolved
@FreyJo
Copy link
Member

FreyJo commented Oct 15, 2020

Ah, I realized you @mindThomas allowed me to push on your branch, so I just did.

@mindThomas
Copy link
Contributor Author

mindThomas commented Oct 15, 2020

@FreyJo Yup. Since you are a maintainer of the upstream repository this permission is easily and if I am not mistaken by default granted when creating the pull request: https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork

Thanks for the code formatting cleanup and the missed template.
test_template_ocp_linear_dae is however still failing in Travis.

@FreyJo
Copy link
Member

FreyJo commented Oct 16, 2020

Great! I just wasn't aware this is possible by default.
The last failing test was unrelated to this PR and fixed in #652

@FreyJo FreyJo merged commit 8a27b62 into acados:master Oct 19, 2020
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

2 participants