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

Add MOI wrapper #150

Merged
merged 13 commits into from
Oct 13, 2020
Merged

Add MOI wrapper #150

merged 13 commits into from
Oct 13, 2020

Conversation

blegat
Copy link
Member

@blegat blegat commented Sep 28, 2020

Largely inspired from the Ipopt wrapper.

Closes #130

end
end

function hessian_lagrangian_structure(model::Optimizer)
Copy link
Member

Choose a reason for hiding this comment

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

IIRC NLopt doesn't take hessians, so all of this code can be deleted.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, this is now removed.

end
end

function jacobian_structure(model::Optimizer)
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed? NLopt supports only dense jacobians.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I followed the approach of the MPB wrapper: since MOI gives the jacobian as the nonzero values of the fixed sparsity structure of the jacobian, the indices of this sparsity need to be queried in order to know where these nonzero values should be put in the dense jacobian given by NLopt.

@blegat blegat marked this pull request as ready for review October 4, 2020 08:39
@blegat
Copy link
Member Author

blegat commented Oct 4, 2020

Should be ready to merge :)

@mlubin
Copy link
Member

mlubin commented Oct 5, 2020

Great work! Could you also update the discussion of MPB in the README?

@blegat
Copy link
Member Author

blegat commented Oct 13, 2020

Any objection to merge ?

@mlubin
Copy link
Member

mlubin commented Oct 13, 2020

Go for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with JuMP 0.19?
2 participants