Export Ampl format from jump model

Using AmplNLWriter.jl I can export a jump model as .NL format (.nl and .opt).

There is a simple way to export the model in AMPL format? (.mod, .dat, .run)?

1 Like

Hi there!

There is a simple way to export the model in AMPL format?

No.

Why do you need this? AmplNLWriter can talk to any AMPL-compatible solver.

1 Like

Hi!

The idea is to use NEOSServer with some solvers that only support AMPL (e.g. LOQO).
I saw that NEOSSERVER.jl only supports solvers that support NL, precisely because it uses AmplNLWriter.jl as you mentioned.

Ah, yes, there’s no way to use NEOSServer (https://github.com/odow/NEOSServer.jl) with something other than a NL file. I’ve considered other options, but they’re too complicated.

1 Like

I understand.
Still about NEOSServe.jl, I can use it with the model (.nl file), but I can’t pass parameters to the solver (.opt file). Does NEOSServer.jl support passing parameters? Or just the model?

1 Like

Currently NEOSServer.jl doesn’t support passing options, but I’d review a PR to add the feature: https://github.com/odow/NEOSServer.jl/issues/35