[Ipopt] MATLAB interface for IPOPT and AMPL models
victor.zverovich at gmail.com
victor.zverovich at gmail.com
Thu Feb 19 11:29:08 EST 2015
Dear Gianpaolo,
You can easily do this with the AMPL Matlab API which is freely available
for all AMPL users: http://ampl.com/products/apibeta/
The API allows you to load AMPL model and data files in MATLAB, solve them
with IPOPT or other solver, get the solution, etc. For example:
ampl = AMPL;
ampl.read('diet.mod');
ampl.readData(diet.dat');
ampl.setOption('solver' ,'ipopt');
ampl.solve
ampl.getObjective('total_cost')
As an additional advantage, this will allow you to easily switch to other
solvers if necessary as AMPL is connected to most of them. Also you won't
need to reimplement your model in another system.
P.S. Sending to the mailing list this time =).
HTH,
Victor
On Thu Feb 19 2015 at 2:10:46 AM Gianpaolo Gulletta <
gianpaologulletta at gmail.com> wrote:
> Dear all,
>
> I would like to know if there is a way to use the matlab interface for
> ipopt in conjunction with an AMPL model.
>
> Basically, I have one AMPL model file (.mod) and three data files (.dat)
> all written in AMPL language. I want to read them all and solve the
> problem.
>
> Is it possible by mean of the MATLAB interface?
>
> Thank you.
>
> Best Regards,
>
> --
> Gianpaolo Gulletta
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20150219/bb2b74fa/attachment.html>
More information about the Ipopt
mailing list