JuliaSmoothOptimizers / AmplNLReader.jl

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

access to variable types #10

Closed mlubin closed 8 years ago

mlubin commented 8 years ago

I wasn't able to find out how to access the counts of the variable types (Tables 3 and 4 in hooking your solver to AMPL). Are these currently exposed?

dpo commented 8 years ago

They're not currently exposed. I'll have a look.

mlubin commented 8 years ago

Thanks! I'm trying to read in some MINLP test problems.

dpo commented 8 years ago

This involves changes to AmplNLReader, NLP (in MathProgBase) and mp itself. To build:

I haven't checked that the values are correct yet. The field names are the same as in AMPL (i.e., not intelligible). Perhaps they should be changed, but it's nice to follow the Hooking document.

mlubin commented 8 years ago

Cool! Did you push your local vartypes branch to MathProgBase? I don't see the changes.

Mirroring AMPL's unintelligible names in the NLP data structure is perhaps an indication that this data structure is a bit of a leaky abstraction and might better fit in AmplNLReader instead of in MathProgBase, but let's not hold up this feature request with possible restructuring.

dpo commented 8 years ago

Oops. Done.

mlubin commented 8 years ago

Tested this out and seemed to give reasonable answers. Thanks!

While we're touching aslinterface.c, could I also request access to nlo so that we can detect if an objective is linear? (ref https://github.com/mlubin/AMPLMathProgInterface.jl/issues/1)

dpo commented 8 years ago

Should be done. Pull all 3 branches.

mlubin commented 8 years ago

Tested and appears to be working