当我试图获得gurobi.optimize()后目标函数的最值(obj.X)的时候,Gurobi报错:GurobiError: Unable to retrieve attribute 'X‘
查找原因是因为添加的相关约束使得原函数无解,所以添加判断语句
if model.status == GRB.OPTIMAL:
extrem = obj.X
标签:retrieve,attribute,Unable,Gurobi,报错,GurobiError From: https://www.cnblogs.com/xinmind/p/16890485.html