AmplNLReader.jl icon indicating copy to clipboard operation
AmplNLReader.jl copied to clipboard

Add linear API

Open tmigot opened this issue 1 year ago • 3 comments

Close #127 (but need to open a new issue afterwards to use the appropriate functions from Ampl API)

Explanations: In NLPModels 0.18/0.19 we added the linear API, i.e. instead of calling cons! you could use cons_lin! and cons_nln to access the linear or nonlinear constraints. Indices of the (non)linear constraints are available in the meta via nlp.meta.lin of size nlp.meta.nlin and nlp.meta.nln of size nlp.meta.nnln. The same applies to the Jacobian and its product.

tmigot avatar Apr 26 '24 11:04 tmigot

@tmigot Is it ready to be merged if I rebase the branch? I think it is what we need for #146.

amontoison avatar Oct 04 '24 16:10 amontoison

I think there should be some Ampl way to make this work. Let me update to more recent versions of NLPModels by skipping some tests. If somebody that knows a bit more than I do Ampl that would be awesome!

tmigot avatar Oct 04 '24 21:10 tmigot

@tmigot May I ask you to just quickly clean you PR such that I can merge it? We can't use NLPModelsKnitro.jl with an AMPL model because of the lack of linear API.

amontoison avatar Aug 08 '25 02:08 amontoison