Scheduling a Sports Camp

Blog Single

2-4-1 Play is a small, but awesome and growing, non-profit whose main activity is running sports camps for kids. The numbers in the name comes from their motto : "Life is 2 Short 4 Just 1 Sport". They believe that kids shouldn't specialize into a single sport early in life. Instead, childhood athletics should emphasize a lot of experimentation and exploration.

2-4-1 Play runs several weeks of camp every summer, at a variety of locations across the country. The biggest camp attracts about 120 kids. The camps offer up to 10 different sport opportunities. The kids can select up to 3 sports to participate in during the camp. They can also request to be placed in the same classes as their friends.

All of these options and possibilities make for an intimidating scheduling challenge. The camp organizers need to figure out how to slot each kid into 3 different sessions during the day, in a way that satisfies both the sport requests and the friend requests. Sometimes this isn't actually possible; for example, a kid might select a set of sports that is completely different from her friends'. In this case, the organizers need to call up the parents and notify them of the problem.

If the scheduling doesn't work out, there can be serious problems. Going to summer camp is often an emotional roller-coaster ride for kids, so if they don't get what they requested, there can be tears and tantrums.

Before building their WebWidgets app, the admins spent days and days working on the schedule for each camp, updating rows in an Excel spreadsheet. They would move kids from session to session by updating a cell, watch the sheet update, and see if the new result looked better than the old one. After a lot of work and headaches, hopefully they would up with something that did an acceptable job at satisfying the various requirements.

When I first started talking to Play241, I was quite optimistic because I knew that this was a software problem that was well-suited to the WWIO use case. It's a relatively unique problem - not many camps have this particular type of scheduling challenge. And it's certainly something that can be addressed by software. But as a small nonprofit, Play241's budget wasn't big enough for custom software development done the traditional way. The data size involved is also quite small (a few records per camper).

I met with the Play241 team a few times and showed them some early prototypes. It was easy to ingest CSV data from their front-end application (called Campminder) into a WebWidget database. And I tried some naive scheduling tricks that seemed promising. It looked like the simplistic approach would save some time, but it might still require the admins to make a lot of corrections and updates.

Then I realized that other researchers must have studied the general problem of scheduling under constraints. I quickly found a powerful tool from Google, called the OR Tools package (OR stands for Operational Research). I was able to write a quick Python script that loaded the request data from the SQLite backend, formulated the problem in a way that the OR engine can handle, and get a solution. When I showed the Play241 team how we could now solve their scheduling problem with a single click, they were amazed.