Skip to main content

Facility Layout Problem, non-overlapping rectangles, model appears to be infeasible

Answered

Comments

5 comments

  • Jaromił Najman
    • Gurobi Staff

    Hi Carole,

    Please note that the code you provided is not a minimal reproducible example, because all input data is missing.

    Regarding the infeasibility, you might want to have a look at the Knowledge Base article How do I determine why my model is infeasible?

    Best regards, 
    Jaromił

    0
  • Carole De Sloovere
    • Gurobi-versary
    • First Comment
    • First Question

    Dear, 

    Thank you for the link, however I did not manage to find the problem yet.

    I updated my previous post and added the data.

    Thank you in advance.

    Kind regards,

    Carole

    0
  • Jaromił Najman
    • Gurobi Staff

    HI Carole,

    Thank you updating the code. Unfortunately, there is still the definition of the \(\texttt{machines}\) object missing.

    I tried defining it as

    machines = [0,1,2,3,4,5,6]

    Would this reproduce the issue?

    With the above machine setting, you can compute an IIS via

        [...]
    else:
            m.computeIIS()
            m.write("iis.ilp")
            print('No solution found.')

    and analyze the \(\texttt{iis.ilp}\) file.

    The IIS compute by Gurobi in this case is given as

    \ Model FLP_copy
    \ LP format - for model browsing. Use MPS format to capture full model detail.
    Minimize
     
    Subject To
     R292: x[4] - 0.5 da[4] - 1.25 db[4] + 100 deltao1[4,1] >= 101.5
     R293: y[4] + 0.5 da[4] + 1.25 db[4] - 100 deltao1[4,1] >= -95.25
     R481: x[4] + pow_x1[4] = 1.5
     R482: y[4] + pow_y1[4] = 3
    Bounds
     x[4] free
     y[4] free
    Binaries
     da[4] db[4] deltao1[4,1]
    End

    Solving equality constraints \(\texttt{R481,R482}\) for \(\texttt{x[4],y[4]}\) and substituting in \(\texttt{R292,R293}\) gives

    - pow_x1[4] - 0.5 da[4] - 1.25 db[4] + 100 deltao1[4,1] >= 100
    - pow_y1[4] + 0.5 da[4] + 1.25 db[4] - 100 deltao1[4,1] >= -98.25

    In the above, \(\texttt{deltao1[4,1]}\) is forced to \(1\) and \(\texttt{pow_x1[4]=da[4]=db[4]=}\)\(0\), because \(\texttt{pow_x1[4]}\) can take only non-negative values.

    This makes inequality \(\texttt{R293}\) read

    - pow_y1[4] >= 1.75

    which is infeasible because \(\texttt{pow_y1[4]}\) is non-negative.

    Best regards, 
    Jaromił

    0
  • Carole De Sloovere
    • Gurobi-versary
    • First Comment
    • First Question

    Dear Jaromil,

    Thank you for investigating my problem, I understand what goes wrong but I do not know how to fix it.

    My intention with all the pow_ variables was to take the difference of the coordinates and I wanted to use the addGenConstrAbs afterwards in order to take the absolute value of the pow_ variables. This was to calculate the rectilinear distances. However, if they can only take positive values, this will indeed make it infeasible. 

    Is there any way to solve this?

    Kind regards,

    Carole

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Carole,

    My intention with all the pow_ variables was to take the difference of the coordinates

    In this case the \(\texttt{pow_}\) variables can be negative. Assume you have 2 coordinates \(x_1=2,x_2=5\). If you compute \(pow_{x_1,x_2} = x_1 - x_2\) then \(pow_{x_1,x_2}\) is negative. You can then take the abs value of the \(pow_{x_1,x_2}\) variable.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.