Skip to main content

Model is infeasible. Is it due to the way I modelled the non-linear constraint?

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi Tan Sheng Hui,

    The addGenConstrPow function is only defined for positive exponents, i.e., \(x^a\) with \(a>0\). You have to model the inverse in the objective the same way as you did for the other constraints.

    Best regards,
    Jaromił

    0
  • Sheng Hui Tan
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Jaromil Najman,

    I changed all the negative using the following line :

    DOD_inverse = m.addConstr(DOD_invr[t] * DOD[t] == 1, name = 'DOD_Inverse')
    inverse_value = DR.addConstr(invr[t] * cap_dod2[t] == 1, name = 'invr'

    However, the model remains unfeasible. I compute the IIS and it returns the following :

    IIS computed: 5 constraints, 1 bound

    Just to check if the constraints as shown in the IIS .ilp file are removed, does it make the model feasible again?

     

    Thank you,

    Tan Sheng Hui

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Tan Sheng Hui,

    It is worth having a look at the documentation of the IIS. If you remove 1 of the 5 constraints or the bound listed in the ILP file, your problem will become feasible again. This means that the 5 constraints are either incompatible together forming an infeasible subproblem or the bound is not set correctly.

    Best regards,
    Jaromił

    0

Post is closed for comments.