Technologies: Python, GLPK
Duration: 2 months
Business goal of that project was to build a tool that could create the best possible lineup of fantasy sport players given their projected fantasy points for the next game. The lineups were built for several sports like NBA, NFL and MLB and several daily fantasy sports (DFS) websites like Fanduel and DraftKings. The tool can build a list of optimal lineups based on the same set of players and their projected fantasy points.
Among other options it is possible to build the best lineups with one or more players already present (locked) in the lineup. It is also possible to constrain each player’s exposure in the list of optimal lineups, min and max number of players from each team in the lineup and more.
Among technical issues we solved was finding a linear programming model that most correctly and efficiently describes the lineup and all corresponding constraints. The project implemented mixed integer linear programming model which was solved by a GNU Linear Programming Kit (GLPK) solver through a Python interface library Pyomo. The tool was implemented as a web service. Model parameters were populated dynamically with JSON data through a REST-like API interface by the end user and the best lineups were also sent to the user as JSON data. The linear programming model actually consisted of six models, one for each sport type (NBA, NFL, MLB) and DFS website (Fanduel, DraftKings).