# \#gurobi

**URL:** https://discourse.julialang.org/tag/gurobi/781.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [In my JuMP model, the LP file preserves the original variable names, but the MPS file appears to rename them, so how can I map the Gurobi .sol solution back to the original JuMP variables?](https://discourse.julialang.org/t/in-my-jump-model-the-lp-file-preserves-the-original-variable-names-but-the-mps-file-appears-to-rename-them-so-how-can-i-map-the-gurobi-sol-solution-back-to-the-original-jump-variables/139462)

<div class="topic-metadata">

**Author:** [@amit\_97](https://discourse.julialang.org/u/amit_97)\
**Replies:** 2\
**Last updated:** [September 14, 2026, 10:19pm UTC](https://discourse.julialang.org/t/in-my-jump-model-the-lp-file-preserves-the-original-variable-names-but-the-mps-file-appears-to-rename-them-so-how-can-i-map-the-gurobi-sol-solution-back-to-the-original-jump-variables/139462 "2026-09-14T22:19:23Z")

</div>

Hi everyone, I’m generating both .lp and .mps files from the same JuMP model using Gurobi. In the LP file, the original JuMP variable names are preserved, for example: 1200 x2\[1,(1,\_0)\] - 41054.62117964038 B2\[1,(1,\_0)…

---

## [Confused by Gurobi's primal simplex algorithm](https://discourse.julialang.org/t/confused-by-gurobis-primal-simplex-algorithm/138318)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [July 18, 2026, 1:42am UTC](https://discourse.julialang.org/t/confused-by-gurobis-primal-simplex-algorithm/138318 "2026-07-18T01:42:09Z")

</div>

I have some my own understanding about the primal simplex algorithm and the dual simplex algorithm. (Suppose the original primal-side problem is min-cost.) For the primal simplex algorithm, the idea is to maintain prima…

---

## [How to manage memory when using JuMP+Gurobi?](https://discourse.julialang.org/t/how-to-manage-memory-when-using-jump-gurobi/136807)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 10\
**Last updated:** [June 11, 2026, 9:18pm UTC](https://discourse.julialang.org/t/how-to-manage-memory-when-using-jump-gurobi/136807 "2026-06-11T21:18:30Z")

</div>

Observe this usr@usr:~/julia\_projects/uc/Uc$ julia --project=. --threads=1,0 \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "…

---

## [Gurobi fails to invoke the primal simplex method when doing column generation?](https://discourse.julialang.org/t/gurobi-fails-to-invoke-the-primal-simplex-method-when-doing-column-generation/133675)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 18\
**Last updated:** [April 30, 2026, 9:17pm UTC](https://discourse.julialang.org/t/gurobi-fails-to-invoke-the-primal-simplex-method-when-doing-column-generation/133675 "2026-04-30T21:17:20Z")

</div>

I have a refreshing discovery today, based on my acquaintance Column generation · JuMP wherein, the only thing I changed was the solver (I used Gurobi instead of HiGHS). This is the master LP’s re-solving logging I acq…

---

## [Error 10005: Cannot retrieve UnbdRay from Gurobi](https://discourse.julialang.org/t/error-10005-cannot-retrieve-unbdray-from-gurobi/136886)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 4\
**Last updated:** [April 26, 2026, 11:39am UTC](https://discourse.julialang.org/t/error-10005-cannot-retrieve-unbdray-from-gurobi/136886 "2026-04-26T11:39:08Z")

</div>

Is this a bug? julia\> Gurobi.GRBsetdblattrarray(lps.o, "Obj", 1, xllen, mst.Xlb) 0 julia\> function opt\_and\_ter(m) # my definition of optimize! and return Gurobi's termination code o, r = m.o, m.refi …

---

## [GC error (probable corruption)](https://discourse.julialang.org/t/gc-error-probable-corruption/13612)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 14\
**Last updated:** [April 18, 2026, 1:18pm UTC](https://discourse.julialang.org/t/gc-error-probable-corruption/13612 "2026-04-18T13:18:26Z")

</div>

I’m stuggling to reproduce a gc related error on Julia v0.7 and v1.0, Windows x86. (But notably, not Julia v0.6.) The tests for GLPK.jl fail with the following error. (Here is the Appveyor log.) Allocations: 2388187 (P…

---

## [Is JuMP.@variable slow when the number gets large?](https://discourse.julialang.org/t/is-jump-variable-slow-when-the-number-gets-large/136430)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 12\
**Last updated:** [April 5, 2026, 12:47am UTC](https://discourse.julialang.org/t/is-jump-variable-slow-when-the-number-gets-large/136430 "2026-04-05T00:47:13Z")

</div>

I have a Unit commitment (24 hours, 5000 scenarios, IEEE118) problem, that has these two lines @time JuMP.@variable(m, pA\[i=\_2(t,T,1), \_0(i,t,S), agi\]) @time JuMP.@variable(m, pf\[i=\_2(t,T,0), \_0(i,t,S), 1:size(F,1)\]) w…

---

## [Julia not using the most recent version of Gurobi](https://discourse.julialang.org/t/julia-not-using-the-most-recent-version-of-gurobi/65539)

<div class="topic-metadata">

**Author:** [@ZHEN\_LIN](https://discourse.julialang.org/u/ZHEN_LIN)\
**Replies:** 10\
**Last updated:** [April 1, 2026, 3:24pm UTC](https://discourse.julialang.org/t/julia-not-using-the-most-recent-version-of-gurobi/65539 "2026-04-01T15:24:38Z")

</div>

I have been using Gurobi 9.0.1 in Julia with JuMP. Now I have installed Gurobi 9.1.2, but the output of Gurobi in Julia indicates that it is still using 9.0.1. How do I make it use the most recent version of Gurobi? I c…

---

## [\`dual\_objective\_value\` in JuMP.solution\_summary](https://discourse.julialang.org/t/dual-objective-value-in-jump-solution-summary/134556)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 12\
**Last updated:** [March 23, 2026, 1:06am UTC](https://discourse.julialang.org/t/dual-objective-value-in-jump-solution-summary/134556 "2026-03-23T01:06:09Z")

</div>

I have a question: what is the dual\_objective\_value below julia\> JuMP.solution\_summary(model) solution\_summary(; result = 1, verbose = false) ├ solver\_name : Gurobi ├ Termination │ ├ termination\_status : OPTIMA…

---

## [Do JuMP Variable ensure contiguous memory to Gurobi?](https://discourse.julialang.org/t/do-jump-variable-ensure-contiguous-memory-to-gurobi/136177)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [March 18, 2026, 6:17am UTC](https://discourse.julialang.org/t/do-jump-variable-ensure-contiguous-memory-to-gurobi/136177 "2026-03-18T06:17:38Z")

</div>

The motivation is that I notices Gurobi exposes the 3 APIs. GRBsetdblattrelement GRBsetdblattrarray GRBsetdblattrlist Allegedly, using GRBsetdblattrarray should be the fastest (than using the list counterpart, than us…

---

## [Why does RefValue has allocation?](https://discourse.julialang.org/t/why-does-refvalue-has-allocation/135720)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [February 20, 2026, 8:57am UTC](https://discourse.julialang.org/t/why-does-refvalue-has-allocation/135720 "2026-02-20T08:57:44Z")

</div>

How to explain that only by adding one line r\[\] I had one more allocation? I don’t understand. You can neglect the packages, just focus on the function \_grbval and grbval, and r. Thanks. import JuMP, Gurobi \_grbval(o, …

---

## [Unsupported constraint only in infeasibility analysis](https://discourse.julialang.org/t/unsupported-constraint-only-in-infeasibility-analysis/135721)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 5\
**Last updated:** [February 18, 2026, 7:39pm UTC](https://discourse.julialang.org/t/unsupported-constraint-only-in-infeasibility-analysis/135721 "2026-02-18T19:39:32Z")

</div>

I have a JuMP.jl model that I solve using Gurobi. For some cases (data) it is infeasible. I am using MathOptAnalyzer.jl to generate an infeasibility report: MathOptAnalyzer.analyze(MathOptAnalyzer.Infeasibility.Analyze…

---

## [Why does \`JuMP.set\_objective\_coefficient(m, x, c::Float64)\` have allocations?](https://discourse.julialang.org/t/why-does-jump-set-objective-coefficient-m-x-c-float64-have-allocations/135717)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [February 18, 2026, 1:31pm UTC](https://discourse.julialang.org/t/why-does-jump-set-objective-coefficient-m-x-c-float64-have-allocations/135717 "2026-02-18T13:31:43Z")

</div>

I’m very curious here. Where can this API lead to allocations so that it has even more allocations that @objective (in number of allocations, though not in total memory size) when I want to reset the objective function? …

---

## [(JuMP) Best way to implement sequential convex (or quadratic) programming](https://discourse.julialang.org/t/jump-best-way-to-implement-sequential-convex-or-quadratic-programming/135669)

<div class="topic-metadata">

**Author:** [@jackyarndley](https://discourse.julialang.org/u/jackyarndley)\
**Replies:** 4\
**Last updated:** [February 17, 2026, 2:43am UTC](https://discourse.julialang.org/t/jump-best-way-to-implement-sequential-convex-or-quadratic-programming/135669 "2026-02-17T02:43:39Z")

</div>

Hi all, I work with sequential convex programming (SCP) for trajectory optimization, which is where a nonlinear programming problem is approximated by a sequence of convex linearizations. The structure of the problem do…

---

## [Is there a reason to use \`@expression\`? I think it's redundant](https://discourse.julialang.org/t/is-there-a-reason-to-use-expression-i-think-its-redundant/131829)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 14\
**Last updated:** [February 8, 2026, 1:04am UTC](https://discourse.julialang.org/t/is-there-a-reason-to-use-expression-i-think-its-redundant/131829 "2026-02-08T01:04:58Z")

</div>

Sometimes I build incorrect expressions obliviously, but JuMP won’t throw an ERROR. Is this good? import JuMP, Gurobi model1 = JuMP.Model(Gurobi.Optimizer); JuMP.@variable(model1, x1 \>= 1); JuMP.@objective(model1, Min, …

---

## [Sometimes no objective\_bound info from an LP solve, by Gurobi](https://discourse.julialang.org/t/sometimes-no-objective-bound-info-from-an-lp-solve-by-gurobi/135080)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 13\
**Last updated:** [January 29, 2026, 7:35am UTC](https://discourse.julialang.org/t/sometimes-no-objective-bound-info-from-an-lp-solve-by-gurobi/135080 "2026-01-29T07:35:35Z")

</div>

I solved an LP by Gurobi using Non-default parameters: Method 6 Crossover 0 PDHGGPU 1 And here’s the result julia\> model A JuMP Model ├ mode: DIRECT ├ solver: Gurobi ├ objective\_sense: MIN\_SENSE │ └ objective\_funct…

---

## [Sometimes cannot reclaim memory by manual GC.gc()](https://discourse.julialang.org/t/sometimes-cannot-reclaim-memory-by-manual-gc-gc/135158)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 9\
**Last updated:** [January 21, 2026, 10:09am UTC](https://discourse.julialang.org/t/sometimes-cannot-reclaim-memory-by-manual-gc-gc/135158 "2026-01-21T10:09:24Z")

</div>

Edit: Please see the #7 post directly if you’re interested. Thanks. The idea is: I at first create a Vector v = Vector{Matrix{Float64}}(undef, 100); Then I need to fill it with some concrete objects (here are matric…

---

## [Specifying objective coefficient when creating a JuMP variable](https://discourse.julialang.org/t/specifying-objective-coefficient-when-creating-a-jump-variable/134923)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [January 12, 2026, 3:36am UTC](https://discourse.julialang.org/t/specifying-objective-coefficient-when-creating-a-jump-variable/134923 "2026-01-12T03:36:47Z")

</div>

What about adding a kwarg option obj in JuMP.@variable so that we can specify objective coefficients? just like the existing lower\_bound? julia\> import JuMP julia\> model = JuMP.Model(); julia\> JuMP.set\_objective\_sense…

---

## [Retrieve current solution when termination\_status is TIME\_LIMIT](https://discourse.julialang.org/t/retrieve-current-solution-when-termination-status-is-time-limit/134464)

<div class="topic-metadata">

**Author:** [@marilena](https://discourse.julialang.org/u/marilena)\
**Replies:** 7\
**Last updated:** [December 12, 2025, 10:02am UTC](https://discourse.julialang.org/t/retrieve-current-solution-when-termination-status-is-time-limit/134464 "2025-12-12T10:02:56Z")

</div>

Hello to the community! I am using Julia v1.9.3 , with packages JuMP v1.23.2 and Gurobi v1.3.1. I am solving an LP using Barrier, and I specify a time limit. gurobi\_env = Gurobi.Env() Solver = optimizer\_with\_attributes…

---

## [Modeling min() in JuMP at scale: SOS1 stops converging, Big-M is numerically unstable](https://discourse.julialang.org/t/modeling-min-in-jump-at-scale-sos1-stops-converging-big-m-is-numerically-unstable/134251)

<div class="topic-metadata">

**Author:** [@Bhanuprakash\_Bahoju](https://discourse.julialang.org/u/Bhanuprakash_Bahoju)\
**Replies:** 11\
**Last updated:** [December 2, 2025, 11:13am UTC](https://discourse.julialang.org/t/modeling-min-in-jump-at-scale-sos1-stops-converging-big-m-is-numerically-unstable/134251 "2025-12-02T11:13:52Z")

</div>

I’m implementing a formula engine in JuMP where users can define expressions like: z = min(x, y) and I translate these automatically into JuMP constraints. I have tried two formulations: 1. SOS1 formulation function…

---

## [Don't understand the results of cuOpt](https://discourse.julialang.org/t/dont-understand-the-results-of-cuopt/133707)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 4\
**Last updated:** [November 24, 2025, 7:02am UTC](https://discourse.julialang.org/t/dont-understand-the-results-of-cuopt/133707 "2025-11-24T07:02:12Z")

</div>

julia\> import JuMP, cuOpt julia\> model = JuMP.Model(); julia\> JuMP.@variable(model, x \>= 0, Int); julia\> JuMP.@variable(model, 0 \<= y \<= 3); julia\> JuMP.@objective(model, Min, 12x + 20y); julia\> JuMP.@constraint(mod…

---

## [Getting an infeasibility certificate from Gurobi when solving hard LPs](https://discourse.julialang.org/t/getting-an-infeasibility-certificate-from-gurobi-when-solving-hard-lps/133639)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 8\
**Last updated:** [November 24, 2025, 1:52am UTC](https://discourse.julialang.org/t/getting-an-infeasibility-certificate-from-gurobi-when-solving-hard-lps/133639 "2025-11-24T01:52:23Z")

</div>

I guess something is wrong with the barrier algorithm, but I have no expertise to read its logging. I log it here, don’t know if someone can have some explanations. (The whole logging has no Warning.) julia\> JuMP.opti…

---

## [AssertionError in Gurobi.jl with OptimalityTarget = 1 on simple nonlinear model (Gurobi 13)](https://discourse.julialang.org/t/assertionerror-in-gurobi-jl-with-optimalitytarget-1-on-simple-nonlinear-model-gurobi-13/133948)

<div class="topic-metadata">

**Author:** [@SingingKim](https://discourse.julialang.org/u/SingingKim)\
**Replies:** 4\
**Last updated:** [November 23, 2025, 7:47pm UTC](https://discourse.julialang.org/t/assertionerror-in-gurobi-jl-with-optimalitytarget-1-on-simple-nonlinear-model-gurobi-13/133948 "2025-11-23T19:47:40Z")

</div>

Hi all, I’m getting an AssertionError when using Gurobi 13 through JuMP with a very small nonlinear model, but only when I set OptimalityTarget = 1. Minimal working example: using JuMP, Gurobi m = Model(Gurobi.Optimi…

---

## [The output of Gurobi's solution isn't qualified as its own input in terms of feasibility](https://discourse.julialang.org/t/the-output-of-gurobis-solution-isnt-qualified-as-its-own-input-in-terms-of-feasibility/133785)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 8\
**Last updated:** [November 11, 2025, 7:20am UTC](https://discourse.julialang.org/t/the-output-of-gurobis-solution-isnt-qualified-as-its-own-input-in-terms-of-feasibility/133785 "2025-11-11T07:20:52Z")

</div>

I write decomposition algorithms with the Gurobi solver, so occasionally I need to use Gurobi’s solution as data input to another model, which is also solved by Gurobi. But I find it annoying that the “$THE\_TITLE”. juli…

---

## [Efficiently Retrieving Variable Values after Gurobi optimization with JuMP](https://discourse.julialang.org/t/efficiently-retrieving-variable-values-after-gurobi-optimization-with-jump/127049)

<div class="topic-metadata">

**Author:** [@Mathis\_3](https://discourse.julialang.org/u/Mathis_3)\
**Replies:** 29\
**Last updated:** [October 23, 2025, 4:45am UTC](https://discourse.julialang.org/t/efficiently-retrieving-variable-values-after-gurobi-optimization-with-jump/127049 "2025-10-23T04:45:19Z")

</div>

Hello, I’m solving a large number of LPs using Gurobi with JuMP, and I noticed that most of the computation time is spent retrieving variable values rather than optimizing the model. Is there a more efficient way to ext…

---

## [HiGHS solver \>100x slower than Gurobi with bilinear big-m relaxation](https://discourse.julialang.org/t/highs-solver-100x-slower-than-gurobi-with-bilinear-big-m-relaxation/114905)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 3\
**Last updated:** [October 22, 2025, 6:24pm UTC](https://discourse.julialang.org/t/highs-solver-100x-slower-than-gurobi-with-bilinear-big-m-relaxation/114905 "2025-10-22T18:24:08Z")

</div>

I’m not sure where to put this as it’s not specifically an issue, and I’m not sure who would improve it. For my research I need to solve a bilinear model and I’d like to use an open-source solver ideally. ▶ Rough exampl…

---

## [How can I stop a Gurobi solve in JuMP in real time (like Ctrl+C) and still keep the solution?](https://discourse.julialang.org/t/how-can-i-stop-a-gurobi-solve-in-jump-in-real-time-like-ctrl-c-and-still-keep-the-solution/132841)

<div class="topic-metadata">

**Author:** [@amit\_97](https://discourse.julialang.org/u/amit_97)\
**Replies:** 11\
**Last updated:** [October 20, 2025, 1:47am UTC](https://discourse.julialang.org/t/how-can-i-stop-a-gurobi-solve-in-jump-in-real-time-like-ctrl-c-and-still-keep-the-solution/132841 "2025-10-20T01:47:50Z")

</div>

I am using JuMP with Gurobi.jl to solve a MIP. In Julia, pressing Ctrl+C usually kills the entire Julia process instead of just stopping Gurobi. My goal is: Stop the optimization at any arbitrary time (not using MIPG…

---

## [Non-convergent "weighted" objective function](https://discourse.julialang.org/t/non-convergent-weighted-objective-function/132785)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 16\
**Last updated:** [October 1, 2025, 7:17am UTC](https://discourse.julialang.org/t/non-convergent-weighted-objective-function/132785 "2025-10-01T07:17:44Z")

</div>

I need to find a way to allocate a pool of resources to perform a series of daily services over the course of a month. There are obviously a long series of general (for all resources) and specific (for individual resour…

---

## [Problem about solution of Gurobi in Julia in JUMP](https://discourse.julialang.org/t/problem-about-solution-of-gurobi-in-julia-in-jump/130926)

<div class="topic-metadata">

**Author:** [@Z\_M](https://discourse.julialang.org/u/Z_M)\
**Replies:** 5\
**Last updated:** [September 29, 2025, 7:52pm UTC](https://discourse.julialang.org/t/problem-about-solution-of-gurobi-in-julia-in-jump/130926 "2025-09-29T19:52:18Z")

</div>

​Hi guys! I use Gurobi in Julia in JUMP. The model has linear constraints and second-order cone constraints. However, the “termination\_status” is：locally\_solved, sometimes is numerous error. Why and how to solve this p…

---

## [Gurobi reports UNKNOWN\_RESULT\_STATUS when Solution count = 10](https://discourse.julialang.org/t/gurobi-reports-unknown-result-status-when-solution-count-10/132311)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 3\
**Last updated:** [September 12, 2025, 6:26am UTC](https://discourse.julialang.org/t/gurobi-reports-unknown-result-status-when-solution-count-10/132311 "2025-09-12T06:26:38Z")

</div>

I cannot figure out why the JuMP.primal\_status(model) is UNKNOWN\_RESULT\_STATUS here julia\> model # a model that is solved before and modified A JuMP Model ├ solver: Gurobi ├ objective\_sense: MIN\_SENSE │ └ objective\_func…

[Next page](https://discourse.julialang.org/tag/gurobi/781.md?match_all_tags=true&page=1&tags%5B%5D=gurobi)
