Let us first define a simplified facility location problem as follows:
$$\min \sum_{i=1}^{n}\sum_{j=1}^{m}d(i,j)x_{i.j}$$
subjected to:
$$\sum_{i=1}^{n} x_{i,j}\geq1, \forall j$$ (Every customer should be served by at least one facility)
$$x_{i,j} \leq y_{j}, \forall i,j$$ (If a customer is assigned to a facility, then the facility should be open)
$$\sum_{j} y_{j} \leq 5$$ (Maximum number of facilities that can be opened should be less than $5$)
$$x_{i,j} \in \{0,1\}$$ $$y_{j} \in \{0,1\}$$
where $x_{i,j}=1$ if and only if customer $j$ is served by facility $i$ and $y_{i}=1$ if and only if facility $i$ is open.
The problem that I am having is actually how to define the objective function to make it more "robust". Obviously this objective function takes into account every customer and weights it as equally important. However, what I would like is to define the objective function such that customers that are very far from other customers should be weighted a bit less important. We can do this in several ways:
- Define the function $d(i,j)$ such that customers living more than $50$km from the facility location have really low weights. But the $50$km is just an arbitrary number. The problem with this method is actually determining the arbritrary number of $50$km. What would be a good number / how would we get a good number?
- Similary to solution 1, we can also weigh the customers, but I am not sure how we should assign the weights.
- Instead of calculating the total distance, we can also compute the average distance as the objective function. Following along this idea, we can also use the median. However, I am not sure whether commercial solvers like CPLEX or Gurobi can handle a median.
My question is therefore, how can we formulate the objective function such that it is more robust to customers living really far away? What would be the best approach?