Optimisation of seating chart

Hello, im trying to optimise the seating arrangment for a wedding on grasshopper. For that i have 4 tables and 61 guests. I created 4 tables with 16 chairs each. I have a list of all the guests, each having one index number. I also have a list of all the chairs, also each with an index number. I created extra lists with groups of people that should sit next to each other. How do I optimise the arrangement with the Galapagos component, giving each guest a new chair index number that makes them sit next to the people in the same group? I already tried the Jitter component, but Galapagos canā€™t optimise randomness, and i obviously canā€™t iterate 64^64 times.
Iā€™d be very grateful for some advice!

Table Chart.gh (26.1 KB)

Am I missing something? I really canā€™t find an answer how to do this. Would really appreciate an advice

I donā€™t see why not? But I donā€™t understand how you are calculating a ā€œfitnessā€ value? The multiple lists of guests are confusing; the ā€œGuestsā€ panel (66 people). the ā€œextra Tableā€ panel (6 people), the Cull Index output (59 people), the Entwine output (48 people)ā€¦ Iā€™m not saying itā€™s wrong, it just doesnā€™t make any sense to me.

I do understand that you probably donā€™t want to break up ā€œgroupsā€ (the Entwine output) but thatā€™s only 79% of the guests (48 / 61). I would think you start with a master list of all guests in groups (as data tree branches) and go from there.

Thank you very much for your reply, yes Iā€™m kind of new to this. Thank you for looking into it.

  1. The Guest panel is a list with all the guests that come.
  2. The extra table panel is just a list of people (bride, groom, parents) that will not be seated at one of the 4 big tables.
  3. The groups that are being entwined are the guests that should be seated next to each other.

The fitness value is being calculated by the distances between the guests in each group (3.).

You are right, I could probably simplify it by starting off with a master list with groups.
I thought it would be impossible to iterate every single possibility due to computation power and time, because there are 64! = 1.27 Ɨ 10^89 different possible seating arrangements.

How would you tackle this task if you would start from scratch?

The ā€œwedding partyā€ (bride, groom, parents) are not guests and should be left out of this.

If the Entwine output were the Guest List, organized by groups, I would proceed in this direction:

The ā€˜Table Capacityā€™ panel tells you the number of tables and the capacity of each one, which could be different. The idea would be to assign groups to tables without exceeding each tableā€™s capacity and without breaking up any groups (obviously). When happy with the counts for all tables, the paths can be used with Tree Branch to get the branches (lists of people), provided that the paths and group counts (length of each branch) are kept in sync.

There are some critical details missing about how this would be done but I can imagine a solution that results in a list of people for each table. Seat assignments at each table are an entirely separate matter - I would probably skip that and leave choice of seats at their assigned table to the guests.

P.S. 64! (factorial) is obviously a vastly different number than ā€œ64 X 64ā€, which is how I misread ā€œ64^64ā€ (64 to the power of 64).

1 Like

Thank you very much,
You are right, I can keep the 6 people out of the List.
Yes that is clever, now I understand what you meant when saying that i should not break up any groups.

That is a good starting point. Iā€™ll try to build on top of that. Thank you Joseph.

P.S. apparently Iā€™m not only bad at grasshopper but also bad at maths, having to double check to find out that its not 64^64 but 64! .

What is not known is which groups would like to sit together? Maybe the best solution is to let each group choose their table, starting with the largest group and working down by group count. Each group could see the people who chose tables ahead of them and make their choice accordingly.

1 Like

Hi Paul,

This reminds me of computer science problems like set cover or vertex cover. My intuitions are:
1 Iā€™m sure this reduces to one of those (perhaps use graphs, where person = vertex, and ā€˜need to sit next to each otherā€™ = edge; ā€˜need to sit on same tableā€™ is another constraint). It would be worthwhile to search in that direction.
2 for strategies, something like greedy (as in greedy algorithm) or even randomization might work!