メインコンテンツへスキップ

Stacking Sequence of Metal plates against a wall

回答済み

コメント

4件のコメント

  • Ronald van der Velden
    Gurobi Staff Gurobi Staff

    Hi,

    I believe you cannot split the problem in these two steps. While the plates selected in image 2 might be sufficient in theory (e.g. the sum of the areas matches the wall), but there is no guarantee that the sequence in image 3 can actually be generated. It's easy to come up with counterexamples.

    So I would try an integrated approach. I believe with the example images, you can divide the wall into smaller cells (e.g. 100x100mm). Now consider a model with binary decision variables that represent "do we place a plate of type T, with top-left corner at position (X,Y)". You can handle rotation by just considering that a  separate plate type. Then the main constraint will be to ensure that each cell (100x100mm square) on the wall is covered by exactly one plate.

    Kind regards,
    Ronald

    0
  • sachin gupta
    First Comment
    Gurobi-versary
    First Question

    Thanks a Ton Ronald :)

    I must say that without this kind of support from Gurobi, i would never have completed any project for any customer. Your support system is a life saver. Trust me, spending on this kind of support is 100 times worthier than any marketing spend. please keep up the good work. 

    Furtheron, i have built on your guidance, which follows like this.

    Assume a wall's dimension is 500 x 500 mm and there are two types of plates : Plate A (100x100) and Plate B (200x200). Of all other constraints, I seek your guidance in constraint 4 (pls refer attached image). Hypothetically every Plate B is divided in 4 sub plates of size (100x100), and when a sub plate (100x100) is placed it has to be accompanied by 1 horizontally and 1 vertically as well. Two requests from you :

    1. Is my overall approach correct?
    2. If yes, please help me drafting the constraint equation for enabling constraint 4. 

    Many many thanks in advance

    0
  • Ronald van der Velden
    Gurobi Staff Gurobi Staff

    Hi,

    I would take a different interpretation of the binary variables. When you set variable A(x,y)=1 then you would mean that the top-left corner of a plate A, is placed at (x,y). In your example, let's assume each cell has size 100x100mm. So by cell (0, 0) we mean the top-left. Cell (1, 0) is next to that and (0, 1) is below that. Now when B(x,y)=1 this would mean that we cover (x,y) but also (x+1,y) and (x,y+1) and (x+1,y+1).

    With that definition, let's imagine we try to build a constraint for cell (x,y). Now we need to find variables that would lead to covering this cell. For plates of type A, that's just A(x,y). But for plates of type B, we would also cover the cell if we put a plate with its top-left corner slightly to the left/top. To be more precise, setting B(x-1,y-1)=1 would also cover cell (x,y) and the same for B(x-1, y) and B(x, y-1).

    In other words, the cell is covered when any of the five variables mentioned here is chosen. Your constraint becomes A(x, y) B(x, y)B(x-1, y) + B(x, y-1) + B(x-1, y-1) = 1. Of course for different cell and plate sizes, the logic becomes more complex but the reasoning is the same.

    Kind regards,
    Ronald

    0
  • sachin gupta
    First Comment
    Gurobi-versary
    First Question

    You Rock Ronald. Let me work on this and I'will get update you soon. Thanks

    0

サインインしてコメントを残してください。