# Any Way to Track Variable Conversion When Writing JuMP Models to File?

**URL:** <https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996>\
**Category:** Optimization (Mathematical)\
**Created:** [March 22, 2024, 11:16pm UTC](https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996 "2024-03-22T23:16:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbassett3](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@rbassett3](https://discourse.julialang.org/u/rbassett3)\
**Post date:** [March 22, 2024, 11:16pm UTC](https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996/1 "2024-03-22T23:16:15Z")

</div>

I’ve created a JuMP model, which I wrote to conic benchmark format (cbf) and then solved with a solver that has a cbf input mechanism but isn’t a solver utilized in JuMP.

I now have the solution to the cbf format as per the solver, but the cbf format doesn’t have variable names, so I don’t know how to link them to the original variable names in the JuMP model. Is this possible? I tried reading the MathOptInterface file for the CBF writer but it didn’t seem clear how to invert the conversion between the JuMP model and the CBF output.

---

<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:** [March 23, 2024, 12:30am UTC](https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996/2 "2024-03-23T00:30:42Z")

</div>

For CBF, not really. We mainly intended the CBF reader as a mechanism to get problems from cblib into JuMP. I don’t think we put much effort into sorting a round-trip for an external solver.

Which solver is it?

---

<div class="post-metadata">

**Author:** ![rbassett3](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@rbassett3](https://discourse.julialang.org/u/rbassett3)\
**Post date:** [March 24, 2024, 3:27am UTC](https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996/3 "2024-03-24T03:27:44Z")

</div>

It’s SCIP-SDP, for solving MISDPs. I will see keep poking around in the code base to see if there’s a way to do this. I was originally trying to query the variable names for each variable passed to CBF, but MathOptInterface wasn’t working liking my query (probably because I’m missing some part of the syntax).

---

<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:** [March 24, 2024, 3:37am UTC](https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996/4 "2024-03-24T03:37:48Z")

</div>

Can you open an issue to track this? I’ll think about how we could fix it

---

<div class="post-metadata">

**Author:** ![rbassett3](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@rbassett3](https://discourse.julialang.org/u/rbassett3)\
**Post date:** [March 24, 2024, 3:50am UTC](https://discourse.julialang.org/t/any-way-to-track-variable-conversion-when-writing-jump-models-to-file/111996/5 "2024-03-24T03:50:04Z")

</div>

Will do! Thanks.
