Skip to content

Add COTS models#9

Merged
0Yassine0 merged 67 commits intomainfrom
4-dev-add-cots-models
Sep 5, 2024
Merged

Add COTS models#9
0Yassine0 merged 67 commits intomainfrom
4-dev-add-cots-models

Conversation

@0Yassine0
Copy link
Copy Markdown
Contributor

No description provided.

@0Yassine0 0Yassine0 linked an issue Sep 2, 2024 that may be closed by this pull request
@github-actions github-actions bot requested a review from ocots September 2, 2024 07:43
Copy link
Copy Markdown
Collaborator

@frapac frapac left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.

Please make sure you follow Julia's conventions:

  • ensure that the indentations remain consistent (always use 4 spaces to indent, do not mix the indentations in the same file)
  • add unit-tests in test to check if the problems are well defined and run to optimality with Ipopt

@ocots
Copy link
Copy Markdown
Member

ocots commented Sep 3, 2024

@0Yassine0 Check this tutorial: https://control-toolbox.org/OptimalControl.jl/stable/tutorial-nlp.html

ocp = @def begin

    t  [0, 1], time
    x  R², state
    u  R, control

    x(0) == [ -1, 0 ]
    x(1) == [ 0, 0 ]

    (t) == [ x₂(t), u(t) ]

    ( 0.5u(t)^2 )  min

end

docp, nlp = direct_transcription(ocp)

using NLPModelsIpopt

nlp_sol = ipopt(nlp; print_level=5, mu_strategy="adaptive", tol=1e-8, sb="yes")

@0Yassine0 0Yassine0 requested review from frapac and ocots September 3, 2024 13:16
@frapac
Copy link
Copy Markdown
Collaborator

frapac commented Sep 5, 2024

@0Yassine0 tells me when the PR is ready for review, it looks like you are still doing some updates

@0Yassine0
Copy link
Copy Markdown
Contributor Author

@ocots @frapac yes, now it's ready for a last review.

Copy link
Copy Markdown
Collaborator

@frapac frapac left a comment

Choose a reason for hiding this comment

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

LGTM.
I would suggest to use "Squash & Merge" to merge this PR in main, to keep a clean git history.

@0Yassine0
Copy link
Copy Markdown
Contributor Author

I just extended the time limit because the quadrator problem passes the test in a bit more time then set.

@0Yassine0 0Yassine0 merged commit 8686196 into main Sep 5, 2024
@0Yassine0 0Yassine0 deleted the 4-dev-add-cots-models branch September 5, 2024 12:11
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.

[Dev] Add COTS models

3 participants