JuliaSmoothOptimizers / AmplNLReader.jl

Julia AMPL Models Conforming to NLPModels.jl
Other
18 stars 10 forks source link

Add linear API #140

Open tmigot opened 4 months ago

tmigot commented 4 months ago

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.