Jump to content

Making league schedule times even for all teams


ninedoors

Recommended Posts

Note:  I have posted this also in the Math Programming Board, can some admin remove it as I meant to post it here.  Sorry.

 

I have been working on creating a script that will schedule games for a hockey league I run.  So far I have been able to get the schedule filled out so that each team plays each other equally or as equally as they can.  My inputs were the number of teams in the league and the number of games each team plays.  Also moved the teams around in each game to get equal home and away games for each team.

 

That part went fine but now I am running in to a bit of a problem with the actually scheduling of the game times.  So far I have created a temp table that holds all the possible game dates, times and locations.  So a couple rows of the table would be:

 

2008-10-01, 9:00 pm, IRC Rink

2008-10-01, 10:00 pm, IRC Rink

2008-10-01, 11:00 pm, IRC Rink

2008-10-03 9:30 pm, IRC Rink....and so on, so that every date/time is in the table. 

 

My problem is coming with trying to get it so that each team will have an equal amount of 9 pm games as they do 11 pm games.  Does anyone have any ideas on how they would go about do such a thing.  Thanks for the input.

 

Nick

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.