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

Fix nlpmodif compat #98

Merged
merged 4 commits into from
Aug 11, 2022
Merged

Fix nlpmodif compat #98

merged 4 commits into from
Aug 11, 2022

Conversation

tmigot
Copy link
Member

@tmigot tmigot commented Aug 9, 2022

No description provided.

@tmigot
Copy link
Member Author

tmigot commented Aug 9, 2022

@geoffroyleconte The update of what you sent me. Could you verify that it works with JuliaSmoothOptimizers/NLPModelsModifiers.jl#66 ?

@tmigot tmigot marked this pull request as draft August 9, 2022 20:37
@tmigot
Copy link
Member Author

tmigot commented Aug 9, 2022

Besides, another thing would be to add consistent_nlps(nlps, linear_api = true) instead of just consistent_nlps(nlps)

@tmigot tmigot requested a review from geoffroyleconte August 9, 2022 21:12
@geoffroyleconte
Copy link
Member

Why the changes on the test problems? I think that QuadraticModels was supposed to work on them before. Also I don't think that the function get_slack_ind is ever called in QuadraticModels since it uses its own SlackModel (which returns a QuadraticModel). But I'm not 100% sure because I do not really know what is doing NLPModelsTests, maybe it is using other AbstractNLPModels that are not QuadraticModels?

@tmigot
Copy link
Member Author

tmigot commented Aug 9, 2022

I modified the problem using ADNLPModel, because there is now a specific constructor for the linear constraints.

NLPModelsTest test the consistency of the current model, but it also test the consistency of the slack-version of the model, cf https://github.com/JuliaSmoothOptimizers/NLPModelsTest.jl/blob/c535a4ce22774dc9bc7fb9e720a30a68fa515888/src/nlp/consistency.jl#L15. There was a bug of the slack version of the ADNLPModel

@geoffroyleconte
Copy link
Member

OK thanks! So the QuadraticModels.jl tests call SlackModel on a model that is not a QuadraticModel at some point if I understood correctly? I still get the same error message.

@tmigot
Copy link
Member Author

tmigot commented Aug 10, 2022

Yes, the last issues are not coming from the QuadraticModels but from the ADModels you are comparing to.

Weird, it does pass on my computer with the following config:

     Project QuadraticModels v0.8.1
      Status `C:\Users\tangi\Documents\cvs\QuadraticModels.jl\Project.toml`
  [54578032] ADNLPModels v0.4.0
  [5c8ed15e] LinearOperators v2.3.2
  [a4795742] NLPModels v0.19.0
  [e01155f1] NLPModelsModifiers v0.6.1 `https://github.com/JuliaSmoothOptimizers/NLPModelsModifiers.jl#fix-bug-slack`
  [7998695d] NLPModelsTest v0.8.1
  [10f199a5] QPSReader v0.2.1
  [ae029012] Requires v1.3.0
  [ff4d7338] SolverCore v0.2.4
  [fa32481b] SparseMatricesCOO v0.1.1
  [37e2e46d] LinearAlgebra
  [2f01184e] SparseArrays

@geoffroyleconte
Copy link
Member

Oh ok my bad I did not take the right branch. This does work for me too.

@tmigot tmigot force-pushed the fix-nlpmodif-compat branch from f7a058f to e59299d Compare August 11, 2022 11:59
@tmigot tmigot marked this pull request as ready for review August 11, 2022 12:09
@tmigot
Copy link
Member Author

tmigot commented Aug 11, 2022

Hey @geoffroyleconte ! It works well for me, now.

@tmigot tmigot requested review from geoffroyleconte and removed request for geoffroyleconte August 11, 2022 12:20
@tmigot tmigot merged commit 347ce01 into main Aug 11, 2022
@tmigot tmigot deleted the fix-nlpmodif-compat branch August 11, 2022 14:08
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