PyData Vermont 2024

Optimizing sales representative assignments using integer programming
07-30, 13:00–13:30 (US/Eastern), Filmhouse

Consider the fictional solar company Acme Inc. Prospective solar panel owners schedule appointments for an Acme Inc. sales representative to visit their home and help sell them solar panels. In addition to sales rep availability and location data, suppose that Acme Inc. also has the ability to predict the expected value of each appointment as a function of the lead (potential solar panel owner) and sales rep.

How should Acme Inc. assign sales reps to leads to maximize the sum of expected values over all appointments? This talk is concerned with finding an optimal assignment of sales reps to leads using integer programming tools implemented in or-tools https://developers.google.com/optimization.


Lead routing strategy depends on the business problem. In a call center, for example, it can be sufficient to route incoming calls to different sales reps based on rankings produced by a predictive model. If instead, a potential customer requires a sales rep to visit their home (e.g. for a solar panel sales appointment), then additional effort is likely required to account for travel time, availability, etc.

The latter scenario lends itself to optimization techniques where an objective (total expected value of all sales rep assignments) is maximized (or minimized) subject to some constraints. Data practitioners building predictive models (e.g. to rank sales reps for prospective leads) can make those predictions more decisive by setting up and solving an optimization problem. This talk will walk the audience through the sales rep assignment example from setup to implementation at an introductory level.

Talk outline

minutes 0-5: motivating example of scheduling solar panel sales appointments, solution for a small “toy” example by inspection

minutes 5-15: background on integer linear programs and constraint programming, some history on relevant results and modern solvers

minutes 15-20: equations for the motivating example

minutes 20-30: demo using CP-SAT and MIP solvers in or-tools to find optimal solutions to the motivating example, https://github.com/faradayio/RepAssignment/

I am currently working at Faraday https://faraday.ai/ where I work on research, development, and implementation of new product features. Before that I was working as a mathematician at a government lab. Before that I had a visiting postdoc position at ICERM https://icerm.brown.edu/.