Skip to content

Improve code conciseness in file OptimizationNLopt.jl #920

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

Merged
merged 2 commits into from
May 30, 2025

Conversation

thimotedupuch
Copy link
Contributor

I made use of ternary operator to refactor the code. I also used the fact that occursin() accepts regex.

Note : maybe SciMLBase.requiresconsjac(opt::NLopt.Algorithm) should just return SciMLBase.allowsconstraints(opt) as they are pretty much doing the same thing to the same argument ?

@ChrisRackauckas ChrisRackauckas merged commit fd771c8 into SciML:master May 30, 2025
21 of 25 checks passed
@ChrisRackauckas
Copy link
Member

Note : maybe SciMLBase.requiresconsjac(opt::NLopt.Algorithm) should just return SciMLBase.allowsconstraints(opt) as they are pretty much doing the same thing to the same argument ?

yeah that's another small improvement that can be made.

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.

2 participants