# Export Ampl format from jump model

**URL:** https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [February 16, 2022, 7:34pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584 "2022-02-16T19:34:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![thiagonovaesb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thiagonovaesb/32/33868_2.png) [@thiagonovaesb](https://discourse.julialang.org/u/thiagonovaesb)
#### Post date: [February 16, 2022, 7:34pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584/1 "2022-02-16T19:34:20Z")

</div>

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)?

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [February 16, 2022, 7:36pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584/2 "2022-02-16T19:36:45Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![thiagonovaesb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thiagonovaesb/32/33868_2.png) [@thiagonovaesb](https://discourse.julialang.org/u/thiagonovaesb)
#### Post date: [February 17, 2022, 6:23pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584/4 "2022-02-17T18:23:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [February 17, 2022, 7:44pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584/5 "2022-02-17T19:44:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![thiagonovaesb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thiagonovaesb/32/33868_2.png) [@thiagonovaesb](https://discourse.julialang.org/u/thiagonovaesb)
#### Post date: [February 17, 2022, 7:55pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584/6 "2022-02-17T19:55:16Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [February 17, 2022, 9:50pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584/7 "2022-02-17T21:50:05Z")

</div>

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](https://github.com/odow/NEOSServer.jl/issues/35)
