dpo/ampl.jl — pull request #4 by mlubin (2014-08-04 03:30:20+00:00)
Title: MathProgBase wrapper

Here's my attempt at a MathProgBase wrapper for AMPL.jl.

The ``ampl_ipopt.jl`` script calls Ipopt using it's MathProgBase interface. Seems to work on ``rosenbr.jl``. Obviously not too practically useful because Ipopt has its own ASL interface, but it's a proof of concept.

There are a couple of places where I wasn't sure how to implement the methods; these are indicated with comments.

The only modifications I needed to make to the core was returning the Jacobian and Hessian in sparse triplet form. The ``sparse`` function in Julia deletes structural zeros, which is problematic for detecting the sparsity pattern. I'd say this format is a bit simpler, and the user can easily call ``sparse`` if desired. If you'd prefer to keep the original functionality, I'll just need an alternative method to access the triplet form.

I also added some editorializing to the README, suggesting that solvers should be written using the MathProgBase interface instead of being tied to AMPL directly. This is just my opinion, but this policy would be a great step in the direction of interoperability between solvers and modeling interfaces in Julia. If you have a different view, we can certainly discuss the wording.

CC @IainNZ @joehuchette @tkelman