# AssertionError rowub \< posinf JuMP model

**URL:** <https://discourse.julialang.org/t/assertionerror-rowub-posinf-jump-model/45976>\
**Category:** Optimization (Mathematical)\
**Created:** [September 2, 2020, 9:53pm UTC](https://discourse.julialang.org/t/assertionerror-rowub-posinf-jump-model/45976 "2020-09-02T21:53:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dharik13](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@dharik13](https://discourse.julialang.org/u/dharik13)\
**Post date:** [September 2, 2020, 9:53pm UTC](https://discourse.julialang.org/t/assertionerror-rowub-posinf-jump-model/45976/1 "2020-09-02T21:53:44Z")

</div>

Hello, I am new to using Julia/JuMP (coming from python) and I am encountering the following error when trying to solve an LP model using Gurobi

 ![JuMP_assertionerror](https://global.discourse-cdn.com/julialang/original/3X/f/7/f7018a2a94289a331c8d8030b433aaa12a11825d.png)

I dont quite follow what the statement “AssertionError: rowub[i] \< posinf” means. I have narrowed it down to something related to introducing a variable in the model that can take positive and negative values, but am not sure how to proceed further. I was wondering if someone can explain how to interpret the error to help me proceed forward.

Version: Julia 1.2.0  
CSV v0.5.23  
DataFrames v0.20.0  
Gurobi v0.7.4  
JuMP v0.18.6  
MathProgBase v0.7.7  
StatsBase v0.32.0  
LinearAlgebra

---

<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:** [September 3, 2020, 12:47am UTC](https://discourse.julialang.org/t/assertionerror-rowub-posinf-jump-model/45976/2 "2020-09-03T00:47:49Z")

</div>

You will have a constraint like

```nohighlight
@constraint(model, x + y <= Inf)

```

You can just remove the constraint.

Note that you are using an old version of JuMP, you should update to v0.21.

---

<div class="post-metadata">

**Author:** ![dharik13](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@dharik13](https://discourse.julialang.org/u/dharik13)\
**Post date:** [September 6, 2020, 4:46pm UTC](https://discourse.julialang.org/t/assertionerror-rowub-posinf-jump-model/45976/3 "2020-09-06T16:46:12Z")

</div>

Thanks. Is there a best practice on how to isolate the problematic? Is there a way I can print specific constraints? I should mention that I am generating these constraints in a loop and therefore have not named each constraint.

---

<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:** [September 6, 2020, 9:59pm UTC](https://discourse.julialang.org/t/assertionerror-rowub-posinf-jump-model/45976/4 "2020-09-06T21:59:47Z")

</div>

Comment constraints until the error goes away.

You could also try `write_to_file(model, "my_model.lp")` and take a look at the resulting LP file.
