Getting NaN output from JuMP variable after solving

Hi All,
I am running a linear program with Gurobi. The variable is set as

@variable(mod2,0<=L_time_bC[b in 1:18, c in 1:3] ) ```
I am using julia 1.62 with [c52e3926] Atom v0.12.32
  [336ed68f] CSV v0.8.5
  [9961bab8] Cbc v0.8.0
  [a93c6f00] DataFrames v1.2.0
  [c91e804a] Gadfly v1.3.3
  [2e9cd046] Gurobi v0.9.14
  [682c06a0] JSON v0.21.1
  [4076af6c] JuMP v0.21.8
  [e5e0dc1b] Juno v0.8.4
  [f0f68f2c] PlotlyJS v0.16.4
  [112f6efa] VegaLite v2.6.0
  [ade2ca70] Dates

Welcome! Please provide a minimal (non-)working example (preferrably copy-pastable). In your code, we don’t know what L_time_bC is and there is no indication what’s going wrong.

Please read this for more information on how to best help us to help you:

1 Like

Thanks for the reply. I will try to provide a working example. Just to add the problem is not happening with Julia 1.2. what should be the compatible JuMP version for Julia 1.62

If you have added JuMP via Pkg (e.g. via ]add JuMP), it will automatically pick the most recent version compatible with the julia version you’re using.

Did you check the solution status ? NaN value for JuMP variables are often obtained when the solver did not find any solution. You can see this with the different statuses. Posting the output of solution_summary here could help as well.

2 Likes