# Accessing JuMP variables after reading model from file

**URL:** <https://discourse.julialang.org/t/accessing-jump-variables-after-reading-model-from-file/143020>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [November 19, 2026, 6:38am UTC](https://discourse.julialang.org/t/accessing-jump-variables-after-reading-model-from-file/143020 "2026-11-19T06:38:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [November 19, 2026, 6:49am UTC](https://discourse.julialang.org/t/accessing-jump-variables-after-reading-model-from-file/143020/2 "2026-11-19T06:49:08Z")

</div>

Ok, so Discourse showed me this answer as soon as I posted: [JuMP : how to read a lp problem from file (lp FORMAT) with variables names?](https://discourse.julialang.org/t/jump-how-to-read-a-lp-problem-from-file-lp-format-with-variables-names/133008)

with Oscar’s nice solution:

```julia-auto
solution = Dict(name(x) => value(x) for x in all_variables(model))

```

or use

```julia-auto
all_constraints(model; include_variable_in_set_constraints=true)

```

I think this is just about ‘findability’ - possibly a good inclusion in the docs in Solutions section and/or Models.

---

_[View the full topic](https://discourse.julialang.org/t/accessing-jump-variables-after-reading-model-from-file/143020)._
