Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Assign guests to hotel rooms

by blokhead (Monsignor)
on Sep 15, 2005 at 12:52 UTC ( [id://492190]=note: print w/replies, xml ) Need Help??


in reply to Assign guests to hotel rooms

Looking for help with AI::Genetic and classroom scheduling is a previous thread about doing a similar kind of scheduling-with-constraints with a genetic algorithm. You may want to consider using this kind of approach.

Update: You may also want to look at the Gale Shapely (proposal) stable matching algorithm. Each group of guests ranks the rooms in their order of preference (bigger is better, perhaps), and each room ranks the groups of guests in its order of preference (less wasted space is better, perhaps). Then the two sides "propose" to each other. When it's done, the pairs are made such that no two pairs can break their "engagements" to obtain a more favorable engagement. It's quite a quite and simple algorithm. I can't remember whether the correctness still holds when the number of rooms is different than the number of guests, and I'm a little short of time right now, but it's worth looking at.

blokhead

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://492190]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-18 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found