# Warehouse allocation

## Problem description

A company serves a group of geographically distributed customers, where each demands a certain amount of goods to buy. To cover all the customers efficiently, the company decides to build a network of warehouses. There are a number of locations where to open the warehouses, each location having its capacity.

The goal is to assign customers to warehouses so that the customers are served in the most efficient way.

Input:

• N warehouses, each warehouse w has its capacity and the set-up cost ,
• M customers, each customer c demands certain amount of goods ,
• For each pair <c,w> a cost for delivering the goods from $w$ to $c$ is defined.

Output: Assignment of customers to warehouses such that the uniform evaluation function is minimized

subject to and for all ,

where is a set of customers assigned to the warehouse w and is an indicator function (returns 1, if the argument is true, 0 otherwise).

## Possible representations

• Array of size M, where i-th value represents a number of the warehouse assigned to i-th customer.
• Matrix A[MxN], where ; , if the customer c is assigned to the warehouse w, otherwise .