I am trying to solve an ILP that optimises a problem on graphs using Gurobi. Unfortunately, I get the following error when creating the problem:
gurobipy.GurobiError: Element 302194 of a double array is Nan or Inf.
The error is thrown when setting the objective.
m.setObjective(quicksum([G.G.nodes[node]['prize'] * node_var for node, node_var in nodes.items()]) - quicksum([mod_var * mod[1][1] for mod, mod_var in modules.items()]), GRB.MAXIMIZE)
All my variables are initialised and have a finite value. I don't understand which double array is being referenced. I have not found a solution online.
Can anyone help me?