# Can I recover variable names to PATH labels? JuMP-\>MOI-\>PATHSolver-\>PATH-\>JuMP

**URL:** https://discourse.julialang.org/t/can-i-recover-variable-names-to-path-labels-jump-moi-pathsolver-path-jump/110703
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [February 24, 2024, 6:01pm UTC](https://discourse.julialang.org/t/can-i-recover-variable-names-to-path-labels-jump-moi-pathsolver-path-jump/110703 "2024-02-24T18:01:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![EliLazarus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elilazarus/32/39139_2.png) [@EliLazarus](https://discourse.julialang.org/u/EliLazarus)
#### Post date: [February 24, 2024, 6:01pm UTC](https://discourse.julialang.org/t/can-i-recover-variable-names-to-path-labels-jump-moi-pathsolver-path-jump/110703/1 "2024-02-24T18:01:50Z")

</div>

I am passing named variable/constraints to JuMP. Is there a way to track the variable/constraint _name_ linked to the row f[#] which is what is reported by PATH (looks like unnamed rows as in this [example](https://github.com/chkwon/PATHSolver.jl?tab=readme-ov-file#use-with-the-c-api) without names)?

I am using the PATH solver, via what I believe is a codestack that goes something like JuMP-\>MOI-\>PATHSolver-\>PATH. The output from PATH includes "label"s with the largest error per iteration which are numbered by model row.

It seems like the transformation from name to # is happening somewhere along the stack because the [PATH documentation](https://www.gams.com/latest/docs/S_PATH.html#PATH_LOG_FILE) shows named labels for a model defined more directly, and JuMP obviously knows the variable names and margin values in the solution…

Not sure right now how to provide a MRE from our [metaprogramming structure](https://github.com/anthofflab/MPSGE.jl/blob/main/src/build/build_marketclearance.jl), but with a @variable(model, jump\_var) and an jump\_ex expression, we set  
@constraint(jm, jump\_ex ⟂ jump\_var)

Thanks and apologies for any misunderstandings in my question.

---

<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 24, 2024, 8:58pm UTC](https://discourse.julialang.org/t/can-i-recover-variable-names-to-path-labels-jump-moi-pathsolver-path-jump/110703/2 "2024-02-24T20:58:22Z")

</div>

> Is there a way to track the variable/constraint _name_ linked to the row f[#] which is what is reported by PATH

Not really. I’ve opened an issue:

> <https://github.com/chkwon/PATHSolver.jl/issues/102>
>
> Names from MOI do not make it to PATH. This makes printing and messages hard to …read.
> 
> x-ref https://discourse.julialang.org/t/can-i-recover-variable-names-to-path-labels-jump-moi-pathsolver-path-jump/110703
> 
> The C API has
> 
> https://github.com/chkwon/PATHSolver.jl/blob/f03d0a76bd3ba1d1cdc665d405dfd6c3c77c38c2/src/C\_API.jl#L742-L743
> 
> But we do not pass from MOI:
> 
> https://github.com/chkwon/PATHSolver.jl/blob/f03d0a76bd3ba1d1cdc665d405dfd6c3c77c38c2/src/MOI\_wrapper.jl#L378-L389
> 
> cc @EliLazarus

---

<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 26, 2024, 2:19am UTC](https://discourse.julialang.org/t/can-i-recover-variable-names-to-path-labels-jump-moi-pathsolver-path-jump/110703/3 "2024-02-26T02:19:17Z")

</div>

This is now supported in the latest release of PATHSolver.jl.
