Covid-19 has been a trendic topic most recently. Several decisions in logistics, scheduling, management, etc. has been carried out during the last months. One controversial and critical topic was the purchase and distribution of respirators in Spain at the beginning of the pandemic. The aim of the problem is optimizing the distribution of respirators between the autonomous communities of Spain, satisfying all the health needs with the minimum cost.
In each region there is an estimated number of critical patients who are going to need a respirator as well as a maximum budget they can spend. They start with a predefined number of devices, which can be enough. If that is not the case, the region needs to request more respirators to other communities. The idea is optimizing the transfer of these devices, taking into account the distances between cities in terms of cost.
In this problem a linear optimization with Python functions is developed. Then the variables are considered integers to show how the problem should be resolved in this case.
The implementation with all the details is presented in the notebook covid_optimization.ipynb.
Distances as well as respirators and covid patients are stored in data.xlsx.