# Creating fixed model associated with a MIP model using Gurobi in JuMP

**URL:** https://discourse.julialang.org/t/creating-fixed-model-associated-with-a-mip-model-using-gurobi-in-jump/88961
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [October 19, 2022, 12:18pm UTC](https://discourse.julialang.org/t/creating-fixed-model-associated-with-a-mip-model-using-gurobi-in-jump/88961 "2022-10-19T12:18:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SarojKhanal](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@SarojKhanal](https://discourse.julialang.org/u/SarojKhanal)
#### Post date: [October 19, 2022, 12:18pm UTC](https://discourse.julialang.org/t/creating-fixed-model-associated-with-a-mip-model-using-gurobi-in-jump/88961/1 "2022-10-19T12:18:40Z")

</div>

Hi, I am using JuMP and Gurobi solver to implement a mixed-integer linear program model and trying to access duals. I see `[Model.fixed()](https://www.gurobi.com/documentation/9.5/refman/py_model_fixed.html)` as a way to fix the model for Python for example. How to use this functionality in JuMP?

---

<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: [October 19, 2022, 8:39pm UTC](https://discourse.julialang.org/t/creating-fixed-model-associated-with-a-mip-model-using-gurobi-in-jump/88961/2 "2022-10-19T20:39:23Z")

</div>

There is no easy way to access this from JuMP. Instead, write a function that fixes the value of integer variables. See:

- [Relaxation of MIP in order to use getdual](https://discourse.julialang.org/t/relaxation-of-mip-in-order-to-use-getdual/72529)
- [Solving Fixed-MILP Problem - #4 by odow](https://discourse.julialang.org/t/solving-fixed-milp-problem/51749/4)
