# Automatically generated API and Frontend for a JuMP model

**URL:** <https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [August 5, 2022, 10:27am UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333 "2022-08-05T10:27:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![merrickj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/merrickj/32/22708_2.png) [@merrickj](https://discourse.julialang.org/u/merrickj)\
**Post date:** [August 5, 2022, 10:27am UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333/1 "2022-08-05T10:27:19Z")

</div>

Dear JuMP community,

We would like to share with you MOS, software that automatically generates an API and Frontend for an annotated optimization model: [MOS Software Documentation — MOS documentation](https://fuinn.github.io/mos-docs/)

There are instructions at the link for trying it out. We hope it is useful in making it easier to deploy JuMP models to solve problems, and would be very happy to hear any feedback or answer any questions. We know the language-specific kernels need more work, and we are learning example-by-example.

---

<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:** [August 5, 2022, 10:00pm UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333/2 "2022-08-05T22:00:46Z")

</div>

Nice!

One suggestion: it took me a little while to find your examples: [mos-examples/knapsack\_model.jl at main · Fuinn/mos-examples · GitHub](https://github.com/Fuinn/mos-examples/blob/main/examples/jump/knapsack/knapsack_model.jl).

Perhaps the first part of the docs could be “MOS helps you easily deploy optimization models. Here’s a brief example for CVXPY/JuMP/Pyomo/…” and then some sample code?

---

<div class="post-metadata">

**Author:** ![merrickj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/merrickj/32/22708_2.png) [@merrickj](https://discourse.julialang.org/u/merrickj)\
**Post date:** [August 8, 2022, 12:21pm UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333/3 "2022-08-08T12:21:40Z")

</div>

Thank you very much Oscar for the suggestion, greatly appreciate it. Just updated the docs to reflect this suggestion, and will provide some sample JuMP code directly when we do a larger revamp.

---

<div class="post-metadata">

**Author:** ![merrickj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/merrickj/32/22708_2.png) [@merrickj](https://discourse.julialang.org/u/merrickj)\
**Post date:** [August 18, 2022, 8:48am UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333/4 "2022-08-18T08:48:24Z")

</div>

[This example](https://github.com/Fuinn/mos-examples/tree/main/examples/jump/simple_mip) shows how MOS may serve a JuMP model, serving the same model as show in [this JuMP tutorial example](https://jump.dev/JuMP.jl/stable/tutorials/applications/web_app/).

As a short example, after the model has been added to local or remote MOS server, it may be accessed as follows:

```julia
using MOSInterface
interface = Interface()
model = get_model_with_name(interface, "Simple MIP JuMP Model")
set_interface_object(model, "lower_bound", 1.2)
MOSInterface.run(model)
get_status(model)

```

Details about authentication and preparing the model are at the first link above

---

<div class="post-metadata">

**Author:** ![merrickj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/merrickj/32/22708_2.png) [@merrickj](https://discourse.julialang.org/u/merrickj)\
**Post date:** [August 18, 2022, 10:28am UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333/5 "2022-08-18T10:28:37Z")

</div>

(and an annotated model file can be added to MOS with a one line command)

```julia
model = new_model(interface, "./examples/jump/simple_mip/simple_mip_model.jl")

```
