# Gurobi and non linear

**URL:** <https://discourse.julialang.org/t/gurobi-and-non-linear/111665>\
**Category:** Optimization (Mathematical)\
**Tags:** gurobi\
**Created:** [March 15, 2024, 2:07pm UTC](https://discourse.julialang.org/t/gurobi-and-non-linear/111665 "2024-03-15T14:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [March 15, 2024, 6:24pm UTC](https://discourse.julialang.org/t/gurobi-and-non-linear/111665/4 "2024-03-15T18:24:35Z")

</div>

I think you can use [Gurobi.jl/src/gen110/libgrb\_api.jl at 69d2d6e70ab517751275bea0d4ec0acdb263299f · jump-dev/Gurobi.jl · GitHub](https://github.com/jump-dev/Gurobi.jl/blob/69d2d6e70ab517751275bea0d4ec0acdb263299f/src/gen110/libgrb_api.jl#L549)

From the `Readme.md`

```julia
using JuMP, Gurobi
column(x::VariableRef) = Gurobi.c_column(backend(owner_model(x)), index(x))
model = direct_model(Gurobi.Optimizer())
@variable(model, x[i in 1:2])
@variable(model, y[1:2])
GRBaddgenconstrPow(backend(model), "x1^0.7", column(x[1]), column(y[1]), 0.7, "")
GRBaddgenconstrPow(backend(model), "x2^3", column(x[2]), column(y[2]), 3.0, "")
@objective(model, Min, y[1] + y[2])
optimize!(model)

```

---

_[View the full topic](https://discourse.julialang.org/t/gurobi-and-non-linear/111665)._
