Customer Assignment Problem


The Customer Assignment Problem is closely related to the Facility Location Problem, which is concerned with determining the optimal placement of facilities (from a set of candidate locations) in order to minimize the distance between the company’s facilities and the customers. In this example, we construct a mixed-integer programming (MIP) model to determine the optimal placement of facilities, implement this model in the Gurobi Python API, and compute an optimal solution.

This modeling example is at the intermediate level, where we assume that you know Python and are familiar with the Gurobi Python API. In addition, you should have some knowledge about building mathematical optimization models.



Request a Gurobi Evaluation License or Free Academic License

Modeling examples are coded using the Gurobi Python API in Jupyter Notebook. In order to use the Jupyter Notebooks, you must have a Gurobi License. If you do not have a license, you can request an Evaluation License as a Commercial User or download a free license as an Academic User.


Commercial Users: Free Evaluation Version Academic Users: Free Academic Version



Access the Jupyter Notebook Modeling Example

Click on the button below to be directed to the GitHub HTML page, where you can download the Customer Assignment Jupyter Notebook modeling example.


Customer Assignment Problem