Optimizing the Perfect Day at Disneyland: The Winning GAMSPy Student Competition Project

Posted on: 14 May, 2025 Gamspy Python

Introduction

Imagine trying to make the most of a single day at Disneyland Magic Kingdom. With 30+ attractions, long lines, walk times between rides, and the unpredictable closure of rides, it’s a classic example of a high-stakes optimization problem. This is exactly the challenge our 2024/2025 GAMSPy Student Competition winner, Yiheng Su, tackled. Combining real-world data, mathematical modeling, and the power of Python optimization with GAMSPy, he delivered a solution that perfectly balances fun with efficiency.

This year we launched our first-ever GAMSPy student competition, a contest where undergraduate and graduate students from all over the world put their modeling skills to work and test themselves against each other. Yiheng Su, a first-year PhD student in Computer Science from the University of Wisconsin-Madison earned the top prize.

Yiheng Su, winner of the 2024/2025 GAMSPy Student Competition

Yiheng first found out about GAMSPy in an optimization class taught by Professor Michael Ferris.

“We were required to learn and use it,” he says, “and while programming, I found that GAMSPy was very easy to use, especially for setting up variables, constraints, objectives, and using different solvers.”

This intuitive first experience quickly gave way to inspiration. Shortly after, Su was planning a trip to Disneyland Magic Kingdom with his girlfriend, an idea that soon turned into a full-fledged optimization challenge. Making the best out of GAMSPy capabilities, he built a smart scheduling system that determines the most rewarding route through the park. Paired with smart data processing and useful visualizations, the project is the perfect example of what you can do by tackling the full pipeline of an optimization problem with GAMSPy.


The Model, In a Nutshell

To build a tool capable of planning the “perfect day” at Disneyland, Yiheng started by collecting real-world data on attractions, walking distances, ride durations, and average wait times. Using Python libraries like pandas, numpy, and math, he processed and cleaned the data, transforming scattered online information into structured datasets that could be fed into a model. The preprocessing also involved mapping coordinates and calculating shortest walking paths between attractions in order to capture the real physical layout of the park.

Then, at the core of his optimization model, Su used a mixed-integer programming formulation implemented in GAMSPy. The objective was to maximize the total ride value (a proxy for visitor satisfaction), while subjecting it to realistic constraints like park hours, total walking and waiting time, and ride-specific limitations. Binary decision variables determined whether or not a ride was visited, and sequencing constraints ensured feasible transitions from one attraction to another. Plus, Su also factored in potential ride closures, adding robustness to the final itinerary.

Route visualization of the optimized Disneyland itinerary.

To make the outputs digestible and engaging, Yiheng leaned on matplotlib, folium and googlemaps to generate visual “summaries”. These include detailed schedules breaking down time spent walking, waiting, or enjoying attractions, and route maps through the park clearly visualized in Google Maps. The result is a planning tool that doesn’t just compute an optimal solution, it communicates it clearly and interactively.

View the full project on GitHub

Conclusion

Yiheng Su’s project is more than just a clever use of GAMSPy, it’s a brilliant example of how mathematical modeling can transform even everyday experiences. With real-world data, thoughtful assumptions, and rigorous optimization logic, this project not only showcased the versatility of GAMSPy and Python, it also delivered a solution that’s both technically robust and very imaginative.

More than that, what makes this project shine is its completeness: from data crawling and cleaning, through visualization and distance modeling, all the way to implementing a smart solution using mixed-integer programming. Every step reflects a full-stack approach to decision-making under constraints, something we encounter in fields as varied as supply chain logistics, healthcare planning, and energy systems.

This is exactly the kind of innovation we hoped to inspire with our first GAMSPy student competition. Congratulations again to Yiheng, and a big shoutout to our talented runners-ups, Allicia Moeller and Ahmad Heidari, for raising the bar so high. We’re excited to see how future participants will build on this year’s momentum and continue to push the boundaries of optimization with GAMS and GAMSPy.