AssertionError rowub < posinf JuMP model

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

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

You will have a constraint like

@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.

1 Like

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.

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.