I am using Gurobi 6.0 with Python 2.7. I am curious to know if Gurobi allows the objective function to have values coming from a dictionary with indices of the decision vari
For a somewhat complex causal chain d[(x,y)]
in your code is equivalent to d[(0,1)]
, so the constant -5 winds up being your objective function. The reasons are
What you are trying to do doesn't fit into the integer programming framework. The best way to put this into gurobi is to add indicator variables that x and y take on specific values.