Model is infeasible
AnsweredI have constraints
\[\sum_i a_{i} \times x_{i,j} \leq h \times (b \times q+ \sum_{m=2}^ {c_{j}}y_{j,m} \times ( p_{m} - p_{m-1} ) ) \vee_ j \]
\[\sum_j c_{j}=100\]
here
\(y_{j,m} = 1\) if m units are present in center \(j\), 0 otherwise
\(p_{m}\) and \(p_{m-1}\) values come from pre determined dictionary. here \(c_{j}\) is a decision variable. \(c\) value for each \(j\) will be decided by the model.
the Gurobi code used for these constraints are
m.addConstrs(gp.quicksum(a[i]*X[i,j] for i in flows)
<= (h*(b*q + gp.quicksum(y[j,m]*(p[m]-p[m-1])for m in range (2,100)))) for j in fraction.keys())
m.addConstrs(gp.quicksum(m*y[j,m] for m in range (2,100)) == c[j] for j in fraction.keys())
m.addConstrs(y.sum(j,'*')==1 for j in fraction.keys())
But I am getting output as "model is infeasible". all the other constraints are tested in another model, the issue is coming from this particular constraint only. Kindly enlighten me about the issue. Thanks
With Regards
Sourav
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Sourav,
Please have a look at the Knowledge Base article How do I determine why my model is infeasible?
This should help you resolving your issue.
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments