Skip to content

Add MOI wrapper#157

Merged
tmigot merged 6 commits intoJuliaSmoothOptimizers:mainfrom
blegat:moi
Jul 28, 2023
Merged

Add MOI wrapper#157
tmigot merged 6 commits intoJuliaSmoothOptimizers:mainfrom
blegat:moi

Conversation

@blegat
Copy link
Copy Markdown
Collaborator

@blegat blegat commented Jul 17, 2023

Closes #152

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 17, 2023

Package name latest stable
NLSProblems.jl
OptimizationProblems.jl

Copy link
Copy Markdown
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks @blegat for the PR! That's a great update. I made a couple of comments/questions, but nothing big I think.

Comment thread Project.toml Outdated
Comment thread src/MOI_wrapper.jl
Comment thread src/MOI_wrapper.jl
Comment thread src/MOI_wrapper.jl
elseif MOI.get(optimizer, MOI.TerminationStatus()) == MOI.LOCALLY_SOLVED
return MOI.FEASIBLE_POINT
else
# TODO
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What needs to be done here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You have a better understanding of what's the status of the primal given the optimizer.stats, ...
See here fore the list

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, there is no really other status than :first_order that ensures that you have a ''feasible'' point. That might also be interesting information to add.
You can have access to stats.primal_feas which is the norm if primal feasibility if that helps.

If nothing can be added let's keep it for later.

Comment thread src/MOI_wrapper.jl
end

function MOI.get(::Optimizer, ::MOI.DualStatus)
# TODO
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What needs to be done here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Similar to PrimalStatus but for the dual variables. So if there is no dual available, just return NO_SOLUTION. If you have one and you know it's feasible, return FEASIBLE_POINT, ...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above. Just a complementary question, what do you mean by dual feasibility when you have bounds and inequalities ? I am asking as there could be more than one answer hère I think.

@tmigot tmigot requested a review from amontoison July 24, 2023 14:31
Co-authored-by: tmigot <tangi.migot@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage: 40.00% and project coverage change: -9.71% ⚠️

Comparison is base (a327c1a) 92.88% compared to head (2f7dcef) 83.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
- Coverage   92.88%   83.17%   -9.71%     
==========================================
  Files           4        5       +1     
  Lines         548      630      +82     
==========================================
+ Hits          509      524      +15     
- Misses         39      106      +67     
Files Changed Coverage Δ
src/MOI_wrapper.jl 0.00% <0.00%> (ø)
src/NLPModelsJuMP.jl 100.00% <ø> (ø)
src/utils.jl 92.77% <94.11%> (-0.75%) ⬇️
src/moi_nlp_model.jl 100.00% <100.00%> (ø)
src/moi_nls_model.jl 87.15% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks again @blegat , I just made a couple more comments but we should be very close now.

Comment thread src/MOI_wrapper.jl Outdated
Comment thread src/MOI_wrapper.jl
Comment thread src/MOI_wrapper.jl
Comment thread src/MOI_wrapper.jl
Comment thread src/MOI_wrapper.jl
elseif MOI.get(optimizer, MOI.TerminationStatus()) == MOI.LOCALLY_SOLVED
return MOI.FEASIBLE_POINT
else
# TODO
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, there is no really other status than :first_order that ensures that you have a ''feasible'' point. That might also be interesting information to add.
You can have access to stats.primal_feas which is the norm if primal feasibility if that helps.

If nothing can be added let's keep it for later.

Comment thread src/MOI_wrapper.jl
end

function MOI.get(::Optimizer, ::MOI.DualStatus)
# TODO
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above. Just a complementary question, what do you mean by dual feasibility when you have bounds and inequalities ? I am asking as there could be more than one answer hère I think.

Co-authored-by: tmigot <tangi.migot@gmail.com>
Comment thread src/MOI_wrapper.jl
blegat and others added 2 commits July 27, 2023 09:12
Co-authored-by: tmigot <tangi.migot@gmail.com>
Comment thread src/MOI_wrapper.jl Outdated
Co-authored-by: tmigot <tangi.migot@gmail.com>
Copy link
Copy Markdown
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks @blegat for initiating this new feature. The PR looks good to me now.

@tmigot tmigot mentioned this pull request Jul 28, 2023
7 tasks
@tmigot tmigot merged commit be53ac6 into JuliaSmoothOptimizers:main Jul 28, 2023
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.

MOI Optimizer

2 participants