Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7593 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

This isn't so much a Filemaker question as a logical question.

I distribute employees complimentary tickets to University athletic events. I have been (justly) accused of giving the good seats to friends, so I want to create a system of randomly assigning the tickets.

The problem: the tickets come from the athletics box office in a lump, and there are adjacent tickets ranging from 2 together to 8 or more together. Some employees get 2 tickets, some get 4, and some give their tickets to other employees so there can be a request of 8 or more seats together.

I started with 2 related databases, Employees, and Tickets. But that's as far as I got before I was stumped. Any ideas on how to randomly assign tickets to employees and still get around the adjacent seat issues?

Posted

Random draw.

The first employee drawn gets to choose her/his own ticket(s).

The next employee drawn get to choose her/his own ticket(s) from the remaining lot, and so on.

You could probably implement this in a script, but you would need the input from the winner of each draw to choose the tickets, and if you have lots of them, it could be a slow process.

Posted

Having everyone present at the draw is not an option as we're talking about 50 people working on three shifts. Thanks for the reply, though.

Just thinking aloud:

1. I'd have to draw by largest # of tickets requested together first or I'd finish with an unfillable request

2. I'd have to have some way of marking tickets as adjacent, but not in such a way that they couldn't be broken up

Hmmmmm....

Posted

If anybody cares, this is how I solved it:

2 related files, one employees, one tickets.

Each record in tickets is an adjacent group of tickets, not an individual ticket. Individual tickets are listed in a carriage return-delimited text field, so number of tickets in the group equals number of carriage returns in the field.

Finds all employees requesting largest number of tickets, picks one at random

Finds all adjacent groups with enough tickets to accomodate the current request, picks one at random

Assigns tickets to that employee, marks him as assigned and takes him out of the available list of employees, removes assigned tickets from group

Loops, going to smaller and smaller ticket requests until all tickets are assigned

It takes about 7 seconds to assign tickets to 50 employees

Posted

As I posted this, I was listening to Soul Coughing's "Is Chicago, Is Not Chicago" which says:

Saskatoon is in the room

Khartoum is in the room

And I saw Bob Weaver's location. Lo and behold, Saskatoon IS in the room!

Posted

Uh huh, Saskatoon is another one of those silly sounding place names like Kalamzoo, and Timbuctu. Hadn't heard that song though.

Thanks for sharing your solution. This kind of block allotment problem comes up from time to time, and it can be a tricky problem.

This topic is 7593 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.