Saturday, December 5, 2009

Series Layout - Some Basics

Okay, enough philosophical rambling (for now).  This is a peek at work that actually makes a schedule, or at least some of the first basic steps.
Time to open up the spreadsheet (1) and start laying out the series that will ultimately turn into the schedule.  Series are my building blocks.  What do they look like in the spreadsheet?  Here is an example:

Those 3 cells containing 3 numbers define a series for me.  The left cell has the number of games in the series, and I underline that number to help differentiate it and give some pattern to the layout when it is full of series.  The next cell in the middle is a number to indicate the away team.  The last cell on the right is a number to indicate the home team.

I suspect most readers here are familiar with OOTP using counting numbers to represent the teams in the schedule files.  Almost every other reason besides needing them in the end result also points to using numbers to represent teams.  The names are essentially never known in making the schedule and will vary across seasons anyway, small numbers allow the spreadsheet cells to be very small and compact, and numbers allow use of formulas in various processing steps through development.

Going back to the series shown above with 3 games of 1 playing at 2, let us expand on those teams' matchups to what they may have for a whole season.  Suppose these teams are division opponents and are determined to be playing each other a total of 20 times.  The obvious choice then is to have each team host 10 of those 20 games, and 10 games can be spread across three series of 3, 3, and 4 games.  That would look like this:

 That is simple enough, so let us now step from two teams to four teams.  For an added level of complication we will have the number of games against each opponent be not quite equal and not all even.  That means special attention must be paid to make sure the home and away game totals even out.

Suppose the four teams are each to play a total of 38 games combined against the other three teams.  If it was 36 total games, it would be easy to split them 12 (6 H & 6 A) against each of the 3 opponents.  For 38 there needs to be two "additional" games - one against each of two of the opponents, with one being home and one away.

In this case determining the matchups for any given time is trivial.  Whenever 1 plays 2, then 3 plays 4.  Whenever 1 plays 3, then 2 plays 4.  Whenever 1 plays 4, then 2 plays 3.  I will later discuss handling the matchups for more teams.

There are various ways the additional 1 home game against one opponent and 1 away game against another opponent for each team can be added.  One good way to work it is to give each team the one more home game against the "next" team and the one more away game against the "previous" team.  For example, 1 can host 2 (the "next" number/team) and play at 4 (the "previous" number/team as the last number can be considered the one before the first number) for their additional games.  Then to fill out the needed games 2 can host 3, and 3 can host 4.  The end result looks like this:

The "additional" games are what make the 4-game series not be 3-game series.  Note how two of the 4-game series (2 @ 1 and 4 @ 3) are on the same row, while the other two (1 @ 4 and 3 @ 2) are on separate rows.  Where they are is usually not important, but it can matter and might change as the process continues.


(1) A technical note...  My spreadsheet program is the generic spreadsheet in Microsoft Works.  High-tech, huh?!  I think if I ever got Excel those files could transfer directly over.  The OpenOffice spreadsheet is a little different as in formulas it used semicolons where I have commas now.  Not sure if OO could thus directly ingest my files.

1 comment:

  1. Hey GMO. Read through this blog and very interesting stuff. I just want to say thanks. Your schedules you made me for my rotating interleague schedule and my HS and Feeder leagues really let me enjoy OOTP. Thanks for all the hard work.

    ReplyDelete