views:

229

answers:

1

I have to build a theatre seating plan. Admin should be given an option to right click, add row, delete row, add numbering to seats, add seat to a row or delete seat from a rom (similar to excel rows and columns and cells).

Admin can also click on each row to put specific price for that seat.

What is the best approach to get it done?

This application is on asp.net 3.5.

Thanks

Jibran

+1  A: 

This algorithm looks promising: Gap Avoidance Algorithm in Seating Plan

So, based on that, I'm assuming you're looking for gap avoidance in your seating plan, and that tickets would be purchased in a fixed order. If this is the case, I believe the simplest approach is the greedy approach of placing groups as close to the center of a row as possible. When a row can't handle the next reservation, start at the center of the next row. Always check the first row to see if it can handle more tickets unless the row is completely full.

There are various genetic algorithms for table seating, but I don't think that'll work for the theater approach.

John Ellinwood