# Is there a way to view added constraints in Gurobi (Python)?

I should note that I am very new to Gurobi so apologies if this is obvious. I am working on a project for a class to maximize profit on a theoretical flight network by deciding which routes to fly at what time and with what type of plane using a linear program. However, I keep running into a problem where there aren't any feasible solutions, but it doesn't seem like there should be interfering constraints from what I can tell. I used a loop to add all of the constraints, and I suspect the problem lies with the way I set the loop up. Is there a way to output a list of all the added constraints? It would be a very helpful way to troubleshoot.

• Welcome to OR.SE. Gurobi has some nice videos and tutorials for beginners which can be useful. you could check your loop definition using these materials. Would you see them? (E.g. this or this links) . Also, the answer that @Marco mentioned is very helpful. Mar 9, 2020 at 5:35

model.computeIIS()

model.write("myfile.lp")