Mathematical optimization models for reallocating and sharing health equipment in pandemic situations

In this paper we provide a mathematical programming based decision tool to optimally reallocate and share equipment between different units to efficiently equip hospitals in pandemic emergency situations under lack of resources. The approach is motivated by the COVID-19 pandemic in which many Heath National Systems were not able to satisfy the demand of ventilators, sanitary individual protection equipment or different human resources. Our tool is based in two main principles: (1) Part of the stock of equipment at a unit that is not needed (in near future) could be shared to other units; and (2) extra stock to be shared among the units in a region can be efficiently distributed taking into account the demand of the units. The decisions are taken with the aim of minimizing certain measures of the non-covered demand in a region where units are structured in a given network. The mathematical programming models that we provide are stochastic and multiperiod with different robust objective functions. Since the proposed models are computationally hard to solve, we provide a divide-et-conquer math-heuristic approach. We report the results of applying our approach to the COVID-19 case in different regions of Spain, highlighting some interesting conclusions of our analysis, such as the great increase of treated patients if the proposed redistribution tool is applied.


Introduction
The high contagiousness of the COVID-19 virus has caused the rapid propagation of the virus all over the world; and this has led to the sudden need of hospitalization of a large amount of patients affected by COVID-19, many of them in Intensive Care Units (ICU).This abrupt and massive increase in the number of hospitalizations has bring some hospital to the collapse and has produced lack of material and human resources, such as diagnostic tests, ventilators, ICU beds, etc., in many hospitals.This extreme situation has given rise to the application of improvised measures, such as the creation of field hospitals or ageisming when assigning (insufficient) ventilators to patients [9,12], even though this second measure is not allowed by the World Health Organization [L].Other improvised measure, in Spain for instance, were the hire of ventilators between hospitals in different cities just to cover the demand at a specific time of the pandemic, without taking into account demand forecasting [E, H, I, M], or distributing test packages between regions by population instead of by number of infected citizens [F], etc.In these situations in which the number of COVID-19 infected citizens and the gravity of their disease are distributed heterogeneously in a country or state, it is necessary to provide efficient strategies to distribute equipment and share the available resources between different hospitals or units in order to efficiently satisfy the demands.
Allocating/reallocating resources is a recurrent application of Operations Research and a wide variety of situations and tools analyzing the efficient distribution of goods can be found in literature (see, e.g.[7,14,16,21,26], among many others), although most of them are costoriented, i.e., they are designed to minimize some function of the transportation or set-up costs.However, in emergency situations, satisfying in adequate time the needs of the society affected by any damage, beyond its distribution cost, is crucial.Thus, an efficient resource allocation and collaboration among the different units which may supply materials is essential.In the COVID-19 situation, the life of sick patients depends on the use of ventilators, and the non-infection of health personnel depends on the availability of sanitary protection equipments.Therefore, designing strategies to share equipments between hospitals will help to reduce the impact of this crisis and avoid a lack of human resources able to cut the pandemic.Furthermore, national and regional governments are receiving extra stock of equipments, provided by international suppliers or by different private initiatives (as the home-made confection of face-masks, 3Dprinting of helmets, etc.) and sharing this stock among the different units should be done by mean of the demand of each of the units instead of population-based sharing, as those that have been applied.In September 2020, the pandemic has already provoked close to one million worldwide deaths [R], which reflects the urgent necessity of cooperation of the different agents to palliate the effect of the virus.
In this paper we propose a general framework for the reallocation of any type of equipments and sharing available and extra stock between the different units.Our proposal allows us to generalize some of the approaches that have been recently proposed, including them as special cases.In particular, recently in [20], the authors propose a stochastic multiperiod planning model to allocate and reallocate ventilators to treat critical patients.They perform it for a particular network with a central agency taking the reallocation decision and federal agencies and states deciding on the percentage of available ventilators to share, by minimizing the expected non-covered demand.
The model that we provide considers four main ingredients: Distribution Network:: The units and the different types of available logistic platforms are linked in a network-based input information, allowing us to model different policies stablished for the regions in a country.We assume that a network where the products can be distributed is given.Multiperiod:: The planning is performed for a short time horizon, being the approach a multiperiod decision-making tool.Uncertainty:: Since the demand of equipments in each unit is stochastic along time (it depends on the number of sick or infected citizen), we incorporate this uncertainty in the model.
Robust Decisions:: Our model decides on the optimal way to reallocate and share extra stock based on different aggregation measures of the non-covered demand along the planing horizon, minimizing different robust objective functions, as the the maximum (by units) non-covered expected demand; the maximum (by time periods) non-covered expected demand, the maximum (by regions) non-covered expected demand; the overall non-covered expected demand 1 , and also their minimax regret counterparts that provide robust solutions with a good performance under any of the possible uncertain situations that may happen.
Apart from the above, our model has different particularities that can be adequately tuned to be adapted to each situation.We limit the number of deliveries from each unit to avoid the use of excessive resources needed to load, unload and mount equipments.We also upper bound the amount of equipments to be delivered from each unit to a percentage of the available stock at each period, allowing hospitals to fix such a percentage based on their risk level.
It is clear that Mathematical Programming plays an important role in the design of optimal strategies to (re)distribute goods and determine sharing policies.The above characteristics of our model would require to incorporate to our methodology different elements which makes the problem specially difficult to solve.On the one hand, our problem will be modeled as a Stochastic programming problem [4], in which a function of the expected non-covered demand (which is the uncertain data in our problem) is minimized.Second, we want to find fair solutions that do not harm the weakest units, using Robust objective functions, of type minmax [8,22,28] and minmax regret [10,11,15,19].Also, our problem consists of a planning model in multiple periods, being necessary to deal with multiperiod problems [2,13,23,24].
The rest of the paper is organized as follows.In Section 2, we describe the input elements to derive a model for the problem.Section 3 is devoted to present the mathematical programming models for the problem.The math-heuristic approach is described in Section 4. The analysis of our model for the Spanish data is reported in Section 5. Finally, we draw some conclusions and further extensions in Section 6.

Preliminaries
We analyze here the problem of distributing goods on a network with several particularities, as described above.In this section we describe the elements involved in the problems and introduce the notation and the problem under study.
Let us consider a weighted directed graph G = (N, A; w) where: • N = {1, . . ., n} represents the different units in the distribution system.Some nodes may represent hospitals or (local, regional or national) health logistic centers.• A, the set of arcs, indicates the available direct links between units.• w, the set of weights, origin-destination times (in days) to transfer equipments between the arcs.These weights include the times needed to load, deliver, unload and mount the equipments.

1
Note that although overall non-covered expected demand is not formally a robust function, for the sake of generality we will also analyze this case.For the sake of presentation we assume that a single type of product is distributed along the network, although our approach can be easily adapted to distribute different types of goods (in which case, a set of weights for each product being distributed must be provided).
In Figure 1, we illustrate a hierarchical network that may represent the situation in many countries when distributing health equipments.There, solid circles represent different hospitals.They are supplied by local logistic centers (stars) which are at the same time supplied by regional logistic centers (squares).All the regions are supplied by a national logistic center (empty circle).The lines indicate the links in which the products can be distributed.
From the graph G, we consider the set of pairs of nodes for which there is a path in the graph between them, i.e.W = {(i, j) : i, j ∈ N such that there exist a path from i to j}.
In order to provide an optimal sharing of extra stocks and to account for the different policies of the different regions, we assume that the set of nodes, N , is divided into p groups, N 1 , . . ., N p ⊆ N , not necessarily disjoint, which may represent different regions or clusters of hospitals which may receive extra stock from the same source.Observe that one unit may belong to different regions and receive equipments from different sources.This would be the case of countries that centrally share equipments directly to all (or some) hospitals but also regions with extra or available stock share equipments to the hospitals in the region.In these case, a hospital in the region belongs to two of the N -sets, to the one in which all the hospitals belong to and also to the one in which only the hospitals of the regions are included.
In the example drawn in Figure 1, the different circles linked to a same star may represent one of these sets (provinces), all which are connected to a star linked to the same square represent others sets (regions), and all the square nodes linked with empty circle node is the last set (country).We denote by P = {1, . . ., p}, the index set for the groups of regions.
We also consider the following list of input parameters: • T = {1, . . ., q}: planning horizon (in days).We will perform a distribution planning for a finite number, q, of periods.
• s 0 i : initial stock at node i, for all i ∈ N .Each unit is assumed to have this nonnegative initial stock at the beginning of the planning horizon and that is available to be used or delivered.It represents the number of equipment at each unit to cover the demand.• q t k : amount of extra stock to be shared in period t between the nodes in group N k , for k ∈ P .We assume that the units on group N j may receive a nonnegative number of units at each period.It allows to model situations in which certain regions buy or receive equipment at certain periods and they want to share them among the units that belong to the region.
• Q i : upper bound on the number of deliveries from node i to different units, for i ∈ N .In order to avoid a large (and unrealistic) number of deliveries from units with low demand but high initial stocks, we will restrict the deliveries from each unit.This upper bound will be induced by the capacity of each unit to prepare and load the equipment to deliver.
• ij : length of the shortest path in the graph with origin i and destination j, for all (i, j) ∈ W .This length represents the time (in days) needed to deliver an equipment from unit i to unit j on the graph G.
• γ i : proportion of the available stock (after covering its demand) that unit i is willing to delivered to other units, for i ∈ N .
• g i : upper bound on the number of equipments to be deliver from unit i, for i ∈ N .
• a i : storage capacity of unit i, for i ∈ N .Note that the parameters Q i , γ i , g i and a i do not depend on the time period.However, the time dependence could be easily incorporated in the model, if needed.
Demands.Apart from the above deterministic information, we consider that the demands of equipments required by the units at each period are, as expected, uncertain.We denote the demands as d(ξ), with ξ a random variable.We assume that ξ has finite support, i.e., that a finite number of possible realizations for the demands is possible.Let us denote by Ω(T ) the finite support of possible scenarios, and by d tω i the demand for node i ∈ N at period t ∈ T under scenario ω ∈ Ω(T ).Let us also denote by p ω the probability of scenario ω ∈ Ω(T ), with p ω ≥ 0, and ω∈Ω(T ) p ω = 1.Abusing of notation, unless necessary, we will obviate the index set T in the definition of the set of scenarios, i.e., we will denote by Ω ≡ Ω(T ).
Although we assume in our model that each scenario contains the information of the demands for all nodes and all periods, different assumptions could be done, being our approach still valid.For instance, it can also be assumed that there exist a different set of possible scenarios for the demands for each period and each region, or a set of possible scenarios for each period (independently of node or the region).For example, in this last case, for each t ∈ T there would exist a set of scenarios Ω t .And for each ω ∈ Ω t we would have a vector of demands d tω = (d tω 1 , . . ., d tω n ), with an associate probability p tω with With the above input information, our approach consists of determining an optimal redistribution planning for the equipments between units and a sharing policy by minimizing a function that takes into account the demand that is not able to be covered at each unit and period by the lack of resources.

Mathematical Programming Model
In this section we provide a family of mathematical programming models to make decisions on: (1) the amount of product to be delivered between the different nodes of the network at each of the periods of the time horizon; and (2) the sharing of extra amounts received at each time period between the different groups N 1 , . . ., N p , by minimizing different measures of the noncovered demand along the time horizon.Due to the existence of uncertainty in the demands, we propose robust solutions that perform well under any scenario.We describe the different mathematical programming approaches which differ on the measures of the non-covered demand that are considered but share the same sets of variables and constraints.
3.1.Variables.We consider the following decision variables in our models.
• x t ij : amount of equipments to deliver from unit i to unit j at period t, for all (i, j) ∈ W , t ∈ T .• s t ik : stock of equipments received by node i from the sharing of group N k at time period t, for all i ∈ N k , k ∈ {1, . . ., p}, t ∈ T .
Observe that the above decision variables do not depend on the scenarios, since our aim is to provide a solution (distribution) with a good behaviour under any of the scenarios that may occur.
We also consider the following auxiliary variables, which can be derived using the above decision variables, to ease the exposition of the models: 1 if at least one equipment is delivered from i to j at period t, 0 otherwise, , for all (i, j) ∈ W , t ∈ T .This variable allows us to control the different loads of equipments from a given unit.In particular j∈N :(i,j)∈W y ij is the overall number of loads that are prepared at period t from unit i, and will be upper bounded to avoid an excess of loads from each unit.Observe that this variables can be obtained from the x-variables as: , for all (i, j) ∈ W, t ∈ T.
• S t i : accumulated stock in node i until period t: It is the initial stock plus the extra shared stock received by each of the groups where i belongs to.• R t i : amount of product received until period t by unit i from other units: It is the overall sum on all the units from what i is able to receive equipments and in all the periods t in which the equipments are delivered plus the delivering time are previous or equal to t. • D t i : amount of product delivered until period t by unit i: • H tω i : effective excess at time period t from unit i under scenario ω ∈ Ω: where D 0 i = 0.That is, the stock received until this period, plus the amount received until this period, minus the delivered until the previous period, minus the demand in this period.If the demand is not covered, , then the excess is 0. This amount represents the number of equipments that are available at the units in each period (under every scenario) after covering the demand at that unit.
• Non-Covered Demand of unit i at time period t under scenario ω ∈ Ω: Which is computed as the demand of the unit at that period plus the amount of equipments delivered from the unit at that period minus the cumulated stock and the product received until that period.In case N CD tω i > 0, the demand plus the delivered are greater than the amount received, being not desirable and producing lack of resources at that period.Otherwise, if N CD tω i < 0, the demand plus the number of deliveries is less than the received amount, then the demand d tω i , can be covered with the available equipments.
• Nonnegative Non-Covered Demand of demand point i at time period t under scenario As mentioned above, the actual demand that is not covered at a unit at a given time period under a given scenario is represented only when N CD tω i > 0. Thus, this auxiliary variable consider only that positive part, in case it exists, and zero otherwise.These variables will be used in our objective functions instead of N CD tω i to be somehow minimized, since the negative non-covered demand (which represents the positive stock) is not convenient to be minimized because it may provoke an excess of stock in the units.This variable can be modeled in our mathematical programming formulation (in which the N CD-variables are globally minimized) from N CD tω i as follows: for all ω ∈ Ω, i ∈ N, t ∈ T .
3.2.Constraints.The above variables are related by means of a set of linear constraints that allows to represent adequately the reallocation and sharing problem under analysis: (1) The product to be delivered from a node, in each period and scenario, cannot exceed a percentage of the excess of that node: The constraint enforces that the overall amount of equipments delivered from i (under scenario ω) in period t do not exceed the proportion of the stock that is allowed to be delivered from the unit to other units.It allows each unit to decide the proportion of the excess of equipments that is willing to deliver to other units.For risk-averse units, the proportion might be small, while for risk-adverse units, the proportion might be fixed to larger amounts.(2) The amount to be delivered from a unit to other are zero unless the y variables take value one and viceversa.
In case y t ij = 0, then, one cannot deliver any product from unit i to j, otherwise and amount between 1 and g i can be sent.
(3) Upper bound on the number of deliveries from a node to different nodes in each period: As mentioned in the definition of the y-variables, even in case a large stock is available in unit i, it is not realistic to assume that such a unit deliver equipments to as much as units as desired.This constraint limits such a number to Q i .(4) Amount to be shared for each group and each period: It is assumed that all the extra stock wants to be shared between the units in N k .One may instead assume that not all the stock needs to be shared, and the constraint may be replaced by the same but with ≤ instead the equation.( 5) Avoid to simultaneously deliver and receive equipments in the same unit: In particular, in case k = i, the constraint enforces that no bidirectional deliveries are allowed at the same period.Note that one may replace the set W by a subset of it to allow some of the units to deliver and receive at the same period.This constraint avoids that units requiring demand deliver equipments.(6) Upper bound on the storage capacity of each hospital and each period: Most units may not have unlimited space to store all the equipments they receive.This constraints avoid this effects and allows receiving material only if they have space to store it or directly use it.
3.3.Objective Functions.Our stochastic mathematical programming models will have the following common shape: min Φ(s, x, y; Ω) where Φ(•) will be a measure of the overall non-covered demands, and will determine the difference between the different approaches.
We consider four different robust objective functions for the mathematical programming problem described above to be minimized: • Maximum non-covered expected demand of the units within the time horizon: This function equilibrates the expected non-covered demand for all the units along the whole time horizon.• Maximum non-covered expected demand of the demand points at each period : Here, one equilibrates, not only units for the whole time horizon, but also the different periods, avoiding tiny non-covered demands in a period at the price of large non-covered demands in others.• Maximum non-covered expected demand in each region within the time horizon: where M 1 , . . ., M L ⊂ N is disjoint partition of N in L sets.Instead of finding fair solutions for all units and periods, in Φ 3 , the units are aggregated by these regions, being the criterion to find equilibrate regional solutions.These sets represent different non overlapping regions in which the effect of a distribution planning wants to be measured.In practice, they can be determined by the political borders of a country (states, regions, districts, etc) in which the policies stablished at each of them want to be evaluated.
• Minimize the total non-covered expected demand : Finally, this function account for the overall non-covered demand for all scenarios, units and period along the time horizon.
The specific shape of the objective functions, among those described above, that is used in our decision tool must be chosen by the decision maker based on its own preferences.Φ 1 allows one to find fair solutions by units (e.g., hospitals) taking into account the most harmed ones, in terms of the non covered demand, while in Φ 3 , the fairness is measured by regions instead of single units.Objective Φ 2 also accounts for equilibrating the non covered demand by periods, avoiding low non covered demand in some periods at the price of high non covered demands in others.Finally, Φ 4 is the classical averaged measure which allows to globally minimize the non covered demand, which may harm some units to benefit others.The decision maker may also run all the models and, in view of the results, decide the most reasonable situation.
Apart from the four objective functions Φ 1 , . . ., Φ 4 , we also consider in our approach their max-regret counterparts.For any ω ∈ Ω we denote by Φ * (ω) the optimal value of the problem above but only under scenario ω ∈ Ω, i.e., Φ * (ω) := min Φ(s, x, y; {ω}) for any of the objective functions defined above We define the regret of a solution (x, y, s) under scenario ω ∈ Ω as: that is, the difference between the actual evaluation in the global objective function Φ ∈ {Φ 1 , Φ 2 , Φ 3 , Φ 4 } of feasible solution (s, x, y) under scenario ω and the optimal value obtained for such a single scenario ω.
The minmax regret criterion seeks a solution minimizing the maximum regret among all scenarios, that is, it seeks a solution whose value is as close as possible to the optimal value for every scenario (see, for instance, [1,3,17,18] and the references therein).The regret version of (StochP) is: The above formulation can be equivalently rewritten as:

Math-Heuristic Procedure
The mathematical programming formulations described in Section 3 involve integer variables to represent the decision variables concerning the deliveries (x) and the shared amounts (s).Furthermore, they use other sets of auxiliary binary and continuous variables in order to adequately represent the constraints and the objective functions, as y or those that allows to model the excess of stock or the nonnegative non-covered demand.Thus, the Mixed Integer Linear Programming (MILP) model becomes hard to solve when the number of units (N ) and periods (T ) is large, as usual.In this section we describe a math-heuristic approach that allows us to obtain good quality feasible solutions for the problem in reasonable computational times, but still using mathematical programming tools to solve up to optimality some subproblems.The main idea under the heuristic is to split the time horizon in shorter time horizons and merge the obtained results of the smaller problems adequately.
In our approach we split T = {1, . . ., q} into smaller sorted non-overlapping subperiods, Although one may solve the problem at each of the sets T k instead of on the whole T , the obtained solution is not feasible for our problem since the initial stock at the beginning of each subperiod is not defined, except for the first interval.To overcome this difficulty we propose an approach to adequately glue the obtained solutions to construct a feasible solution of the original problem.For the sake of this gluing process, instead of solving the problems within the time periods T 1 , . . ., T K , we consider the subperiods T + 1 , . . ., T + K , where T + k = T k ∪ {t k }, i.e., the first element in T k+1 is added to T k (except for k = K) in order to link them with a single common period.Next, the MILP is solved for T + 1 , calculating the reallocation and sharing policies for that interval, for all its time periods instead those of the last one, t 2 , where, instead, we compute the excess of each unit at that period.This excess is used as input of the initial stock for solving the next subperiod, T + 2 .The process is repeated until the complete execution of all the subperiods is performed.Observe that, unless delivering times are zero, the x and y variables in the last period of each interval are zero, since it is not possible to cover any demand.The values of the x and s-variables are the sequentially obtained, while the value of the objective function (for each of them) has to be constructed once the procedure is terminated.In Algorithm 1 we show the pseudocode of proposed procedure.
Proof.Observe that at each time period, t, the obtained solution verifies all the constraints of the model, except (C 1 ) and (C 6 ) which depend on the auxiliary H-variables, since they are separable by the index t.For the case of (C 1 ) and (C 6 ), they depend on the H-variables which were defined as: , Thus, they depend on the amount of product received and delivered until the previous period, and also on the stock accumulated until that period (which are accumulated from the initial Algorithm 1: Heuristic prodedure.Choose t 0 , t 1 , . . ., t K such that 1 =: period to period t).Let us denote by: the amount of available product in unit i at period t ∈ T k before attending the demand of the unit, but after receiving (from other units or shared by its region) equipments and delivering, where for k ∈ {1, . . ., K}, i ∈ N and t ∈ T k .
Note that this values are the subperiod counterparts of the global variables defined in our model.
For t ∈ T k we get that: Thus, the H-variables in our model are adequately recovered from the solutions obtained solving the problem by subperiods.Since for each of the subproblems on T + k , the constraints: are verified for t ∈ T k and i ∈ N , ω ∈ Ω and k ∈ {1, . . ., K}, then (C 1 ) and (C 6 ) are also verified.
From the above result, we get that our procedure provides feasible solution to our problem, and then gives us upper bounds for the exact optimal values of our problems.

Case Study: Reallocation and Sharing of Ventilators in Spain
One of the main causes for the critical situation in hospitals during the COVID-19 crisis in Spain has been the high demand of invasive mechanical ventilation among severe patients, together with the lack of this resource in some hospitals around the country.Invasive mechanical ventilation is used to assist patients with serious breathing problems ( [25, K]).
We devote this section to analyze the reallocation and sharing of invasive mechanical ventilators (from now on ventilators) in two regions in Spain with different demand distribution during the first wave: the region Madrid, in which the pandemic caused a large amount of critical patients and dead, and the region of Andalucía, in which the situation was slightly less critical.We use the proposed mathematical programming models to determine if the covered demand of patients needing a ventilator could have been significantly improved if reallocation and sharing would have been applied during the first COVID-19 wave, the 49 days from March 8th to April 25th, 2020.

Input Information.
In what follows we describe the input information that we use in our models as well as the results obtained after running them.All the input information that we use in our experiments are available in the GitHub repository https://github.com/vblancoOR/RedistributionCOVID19.
Graph Structure.We consider two types of graph structures trying to simulate possible real networks of the regions of Madrid and Andalucía.While the region of Madrid has 51 hospitals, the region of Andalucía has 106.
Note that being the graph structure an input, it can be modified to adjust the reality of the regions.In particular: Complete (C):: We consider a complete graph in which all nodes (units) are connected bidirectionally.Logistic Centers (LC):: We incorporate logistic centers of provinces and regions, and we consider that each hospital of a province is only bidirectionally linked with the logistic center of the province, and the logistic centers of the provinces are linked through the regional logistic center.For each of the two considered regions the situation is different: • Region of Madrid : Since this region has a single province, we assume that the unique logistic center is located in the city of Madrid in Hospital de la Paz.• Region of Andalucía: In this region there exist a logistic center in each of its eight provinces.We assume that the regional logistic center is located in the Hospital de Antequera in Málaga (geographical center of Andalucía).This graph has 105 arcs.
In Figure 2, we show, this graph structure in this region.
For the region of Madrid a single N 1 region is considered (containing all the 51 hospitals in the region).In Andalucía, we consider N 1 , . . ., N 8 as the sets containing each of the hospitals in the different provinces.The sets M for the objective functions Φ 3 and Φ Regret 3 coincide with the N -sets, that is, the regions for which fair solutions are desired are the same as those for which the sharing policies are designed.
Furthermore, in Andalucía, for the LC-graph structure, we also use the set N 9 containing the eight logistic centers (but it is not included in the M -sets used in the Φ 3 -objective functions).Initial stocks.The initial number of invasive mechanical ventilators in each hospital is crucial to conduct an accurate study.However, these official stocks were not publicly available in Spain.In order to estimate them we collected information from different sources.Since the main reason because patients are admitted to an ICU is to receive ventilatory support [25], we assume that this number coincides with the number of ICU beds, although in some cases this amounts can be slightly larger due to extra ventilators situated at other types of beds.This underestimation may be favorable since those ventilators are available for the hospitals in case more patients than the estimated need a ventilator.The proportion of ICU beds in public and private hospitals of each region [A] together with the the number of beds in each hospital [D] allows us to estimate the initial stock of ventilators of each hospital.
Extra stock.The extra stock at each time period indicates the new available ventilators to share (if any) in that period among the hospitals of a given region.During the COVID-19 crisis different national or regional governments have bought and received extra invasive mechanical ventilators as reported by some national newspapers ([E, H, I, J, M, O, Q], among many others).The situation in the two considered regions is different: • Region of Madrid: In this region, the regional government received 351 ventilators at the end of March and 213 ventilators at the early April [O].It also received ventilators from other regions of Spain: Galicia lent 11 ventilators [M] on March 27th, Andalucía 22 ventilators [E] at the end of March, Extremadura 10 ventilators [H] at the end of March and Murcia 9 ventilators [I] in early April.
• Region of Andalucía: In Andalucía, there is no public information about the extra stock.
However, a significant issue in this region is that Andalucía started to manufacture its own ventilators under the project Andalucía Respira [G, N].Although these ventilators fulfill the quality requirements established by the Ministry of Health, we did not find any information stating that they have been distributed by the region yet.
Apart from the above, some extra stock has also been provided from the Spanish Government and private donations.A total of 2400 ventilators [J, Q] was received to share among all the regions; but there is no information about when and where the ventilators were allocated.We assume that these ventilators were distributed among the regions by means of population.Hence, in the cases of Madrid and Andalucía, we estimate that they received, in the second week of April, 340 and 429 ventilators, respectively.

Capacities.
• Q i : The maximum number of deliveries from a hospital depends on the graph structure.
For the C-Graph we set it to 5, to avoid extra work on preparing packages of ventilators for different trucks.For LC-graph, the parameter for the logistic centers was fixed to infinity, while for the hospitals, we set it to 0.4 times the number of adjacent nodes to the logistic center.
• γ i : The percentage of excess that can be delivered from a hospital was fixed to 0.8.
• g i : The amount of ventilators to be delivered by each hospitals is set to 20, as a measure of transport capacity.
• a i : The storage limit for the hospitals is set to twice the number of ICU beds in the hospital.For logistic centers the parameter is set to infinity.
Shipping times.The arc weights of the graphs are defined based on the geographical distance between the nodes.Then, we compute the shortest paths between each pair of nodes (in each graph structure), and we relativize the transportation times to the largest one.Apart of that we include in the shipping times different graph-dependent processing times: one day for the C-graph and 0.1 days per used logistic center in the LC-graph.This data was collected differently in each region.The region of Madrid reported the daily ICU demands, and then, ready to be incorporated to the models.On the other hand, the government of Andalucía reported the accumulated demand of ICU.We estimated the daily demands as follows: for each hospital, we compute the daily number or new COVID-19 patients in ICU and we assume that each of them stays in ICU 21 days (the average number of days the patients stay on a ICU bed during the first wave [P]).Scenario "Real" was created with these estimated demands.This scenario can be considered as the closest to the real situation that Spain lived during the first wave.Using these demands, we randomly generate two more scenarios as follows: • Choose r − j , r + j uniformly distributed in [0, 0.5], for each province j ∈ P .
), for each hospital i in the province, j, and set, for each scenario the following demands: Scenario "Pessimistic"::

In case dt
i ≤ 0 we set random integer value in {1, 2}.In Figure 3, we show the demands on Scenario Real for the two regions.5.2.Results.The models have been coded in Python 3.7 and using as optimization solver Gurobi 9.0 in a MacBook Pro with a Core 2 Duo CPU clocked at 2,66 GHz and 4GB of RAM memory.We have run our math-heuristic algorithm partitioning the time horizon into 12 subperiods.A time limit of 1 hour was fixed for solving the subproblems, although none of our models reached such a limit.
We have applied our approach to the regions of Madrid and Andalucía.Moreover, we have also run the models in case no sharing is allowed between the hospital.The aim is to compare the obtained redistribution and sharing policies to the real situation in Spain, in which redistribution was not implemented.However, since there is no information about the sharing policies of the extra stock in the real situation, we assume that it was performed optimally according to our models (only fixing in them to 0 the x-variables).Note that we compare our redistribution and sharing proposal to a situation which is better than the actually implemented.
In the following sections, we analyze the results and conclusions obtained through the numerical study.We illustrate them with different graphics and figures for particular configurations of scenarios, objective functions or types of graphs.However, the rest of the figures for the remaining configurations of scenarios, functions or graphs can be found in https://github.com/vblancoOR/RedistributionCOVID19for the interested readers.
Redistribution vs.No Redistribution.We start by comparing the non-covered demand, that is, the number of patients needing a ventilator that were not attended due to the lack of this resource, if the proposed redistribution is carried out, or not.In Figures 4 and 5, in each of the graphics, the continuous red line represents the total non-covered demand at each time period if the real scenario occurs and redistribution is allowed.The dashed red line shows the total non-covered demand at each time period, if the real scenario happens and only the redistribution of the extra stock is allowed, but not the sharing of available stock.Remind that this second case represents a situation better than what was actually applied in Spain, since in this case, the redistribution of the extra stock is done optimally.For simplicity, we will refer to this second case as the without redistribution case.The continuous and dashed green lines represent, respectively, the total available stock in the two described situations: with or without redistribution.Notice that we solve the models taking into account that any of the three considered scenarios can occur, but we represent in these figures the actual behavior if the obtained solution is implemented when the real scenario happens.
We show in Figure 4 the case of the Madrid region, for the graph with logistic centers and objective Φ Regret 2 in the left graphic, and for the complete graph and objective Φ 1 in the right one.We can observe that in all the cases, when redistribution is not carried out, there exist always available stock but also demand that is not being covered.For instance, in the second graphic we can see that in period 25, there are around 250 available ventilators but around 650 patients that are not attended.However, when redistribution is considered, in the periods in which the non-covered demand is positive, the available stock is almost zero, that is, the available stock is redistributed and used.This implies a significant decrease in the number of non-treated patients.For instance, in the same case described before, the non-covered demand reduces to less that 470.A similar behaviour can be observed in the rest of objectives, graphs and scenarios.
In Figure 5, we show the case of the Andalucía region, for a graph with logistic centers and objective Φ Regret 3 (right), and for the complete graph and objective function Φ 4 (left).In this case, we can observe that most of the demand is covered in both cases, with and without redistribution.The reason for this is the availability of stock to cover all the demand in most of the periods.However, there is a critical period, between t = 25 and t = 33, in which the demand increases (see Figure 3) and the non-covered demand is positive for the case without redistribution, even thought there exist more than 200 available ventilators.It can also be observed that for some objective functions, the non-covered demand in the redistribution case is also positive despite existing available stock.The reason for this can be twofold: 1) Since the problem is solved using the heuristic described in Algorithm 1 in which the total time period is split into smaller periods, the heuristic is not able to anticipate, for all the objective functions, the rapid increase of the demand after period 24.2).The collected information for the provinces of Málaga and Sevilla is not accurate, with a sudden big increase and decrease in period 27, as can be observed in Figure 3, which can not always be efficiently handled.However, in most of the cases, the total non-covered demand is lower for the redistribution case, being this value even zero for some of the objective functions, as it is the case of Φ 4 .
We conclude therefore that redistributing the available stock significantly increases the number of treated patients.

Comparison of Redistribution and Sharing Policies.
We compare in this section the behavior of the redistribution through the time horizon and provinces.
We show in Figure 6, the number of redistributed ventilators through the LC-graphs in the achieved solution, at each time period, for the region of Madrid (left) and Andalucía (right) for objective function Φ 3 .We also include in such graphics the demand curves for the three scenarios.Figure 7 shows the same but for the case of C-graphs and objective function Φ Regret 3 .We can observe that the amount of redistributed stock is much higher in the region of Andalucía than in the region of Madrid.This is caused by the fact that the number of demanded ventilators in Madrid is much greater than such number in Andalucía.The high demand in most of the hospitals in Madrid make practically nonexistent the availability of stock to share.The existence of stock to redistribute in periods 6 to 10 in Madrid in is due to the lower demand, and the availability of stock in periods 16, 30 and 32 in Madrid in Figure 6 is due to the entrance of a high quantity of extra stock: 351, 213 and 115 ventilators, respectively, to the logistic center that it is later redistributed.This effect is not observed in the case of the C-graphs, Figure 7, because here the extra stock is directly distributed among the hospitals, and in this graphic  we only show the redistribution among hospital, not the distribution of the extra stock.In the case of Andalucía, the highest amounts of shared ventilators coincide with the periods in which there is lower demand, and therefore more available stock to redistribute anticipating future increases in the demands.In the case of the graphs including logistic centers, there exist more periods with redistribution due to the same effect explained for the case of Madrid, and also to the fact that the delivery constraints imposed to the logistic are less restrictive than for the hospitals.
Note that we are optimizing the non-covered demand, hence, the management of the available stock could maybe have been done better., respectively, for LC-graphs in the first case, and Cgraphs in the last case.Note that the share of extra stock is performed in our model based on the demand required by each hospital and not on population, and then, the pie charts reflect that our model allocates the extra stock by demand.We can observe for instance in the diagram for Φ 4 and LC-graphs, the one in the center, that most of the extra stock is allocated in the province of Córdoba, which is not concentrating the highest proportions of population.For the case of the C-graph and objective function Φ Regret 4 , the distribution is not mostly concentrated in a single province, it is withal more divided among different provinces.However, also in this the distribution is not carried out according to the proportion of inhabitants.For instance, we can see that despite being Sevilla the province with the highest proportion of inhabitants in Andalucía, the proportion of extra stock sent to this province (grey) is one of the lowest ones.
In these pie charts we can also observed the previously described effect: the extra stock is more distributed into different provinces in the the case of the C-graphs that in the case of the LC-graphs.This is due to the fact that it is easier to redistribute later the available stock from the logistic centers than from the hospitals, and also to the fact that the logistic centers have a higher capacity to store stock.Comparison of Non-covered Demand by Scenarios.We show in this section, in Figures 9 and  10, the behaviour of the non-covered demand if the achieved solution is implemented in each of the three considered scenarios: optimistic (left), real (center) and pessimistic (right).Each graphic in each of these figures follows the same style that the graphics presented in Figure 4. Figure 9 illustrates the case of Madrid and objective function Φ Regret 1 , and Figure 10 the case of Andalucía and objective function Φ 4 .In both cases we can appreciate that the pattern of the non-covered demand is practically the same for the three different scenarios, since the tendency of the demand is the same in the three scenarios, but, as expected, the higher the amount of demand, the higher the non-covered demand.For instance, in the worst moment in Madrid and our approach is applied, if optimistic scenario occurs, the non-covered demand aroun 250, meanwhile if pessimistic scenario occurs, the non-covered demand is more than 750.For the case without redistribution, this amounts are around 300 and more than 1000.
Complete Graph vs. Logistic Center Graph.We include in this section a comparison of the non-covered demand for the LC-and C-graphs.In Figure 11, we do it for the case of Madrid and objective functions Φ Regret 2 and Φ Regret 4 , and in Figure 12 for the case of Andalucía and  objective functions Φ 2 and Φ 4 .The red line represents the non-covered demand for the LCgraphs, and the blue line for the C-graphs.For the case of Madrid, the behavior under both graph structures is quite similar.Using logistic centers to redistribute the ventilators seems to perform a bit worse than not using them for more cases (according to the settings we used in the numerical study), but not for all of them.This could be due to the need of considering more than one logistic center since the demand is very high.For the case of Andalucía, using logistic centers seems to perform better and to lead to less high demand peaks.For example, when minimizing the total non-covered expected demand, that is, for objective function Φ 4 (right graphic in Figure 12), using logistic centers results much better than not using them.Different Criteria.We compare in this last section the regret version (dashed line) versus the not regret version (continuous line) of different objective functions for Madrid in Figure 13, and for Andalucía in Figure 14.We can observe that for the cases of Madrid included in Figure 14 (objective function Φ 2 and LC-graph (left) and Φ 4 and C-graph (right)) the total non-covered demand of each objective function practically coincides for the regret and not regret version.The reason for this could be that the existence of few available stock make that the redistribution options are scarce and similar in both cases.For the case of Andalucía, the version without regret tends to perform better for most of the cases if real scenario occurs.However, there exist cases, see for example the case of Φ 2 vs Φ Regret 2 and C-graph (right graphic), for which there exist periods that the regret version covers more demand than the version without regret.
In general, this tendency of the regret version to perform worse than the version without regret is maybe due to the election we made on the demand scenarios.Note that the real scenario, the one for which we are representing the NCD, is approximately an average of the other the other two scenarios, which benefits the objective functions without regret that average over the three scenarios.However, in cases in which the demand scenarios differ more, the regret version may perform better.

Conclusions and Extensions
In this paper we propose a decision aid tools to determine optimal distribution and sharing strategies in emergency situations.The approach is motivated by the COVID-19 pandemic in which, in its first wave, a lack of emergency health equipments provoque hospitals collapse, and many patients were not adequately treated.Our approach allows decide how to distribute equipments through a given network of units along a time horizon and how to share the extra stock received at some of the periods, such that a global measure of the (stochastic) demand of the units is minimized.We provide an unified Mixed Integer Linear Programming formulation for the problem, able to model different distribution networks and different objective (robust  and min-max regret) functions.We also propose a divide-et-conquer math-heuristic approach for the problem that provides feasible solutions of the problem in reasonable computational times.Finally, we analyze the case of the lack of mechanical invasive ventilators during the COVID-19 health crisis in two different Spanish regions.We run our approach with different settings, obtaining as the main conclusion that applying our approach leads to a significant increase in the number of severe patients that can be rightly assisted.Furthermore, we observed that an optimal redistribution of the extra stock must be based on the demand and not on the distribution of population.
An extension of our approach will be the topic of a forthcoming paper.In particular, we observe that the use of logistic centers when distributing equipments in emergency situations may be advisable in many cases, since they may allow more adequate distribution, may allow to store non-used equipments waiting for demand, quicker deliveries, etc.However, some regions do not still have the infrastructures of those centers or the ones that they have are not sufficient.Also, in emergency situations, it may be useful to use field logistic centers during certain periods to improve the distribution of equipments during the demand peaks.In those cases, apart of deciding the amounts to be delivered and shared, one must decide where to locate new logistic centers.Our approach could be extended to this case with major modifications.In particular, the distribution network would not be known and is part of the decision (it depends on the position of the logistic centers), and then, it must be incorporated to the model, increasing considerably the complexity of the approach proposed in this paper.Observe that the model becomes a hub-and-spoke location problem in which the flows associated to commodities are decision variables of the model.Also, an interesting extension of this approach would be the incorporation of ordered weighted averaging aggregations of the non-covered demands to construct solutions under other robust objective functions (see e.g., [5,6] for an application of this type of aggregations in other logistic problems).

Figure 1 .
Figure 1.Example of the graph structure involving different types of units and links in a health distribution system.

Figure 2 .
Figure 2. Graph structure with logistics centers in Andalucía.

Demands.
We estimated the daily ventilator demands based on real ICU demands of COVID-19 patients in Madrid and Andalucía, published by the Spanish [C] and Andalucía [B] governments from 08/03/2020 to 25/04/2020 (first COVID-19 wave data).

Figure 3 .
Figure 3. Real demands of ventilators for Region of Andalucía (left) and Region of Madrid (right).

Figure 4 .
Figure 4. Non-covered demand (red lines) and available stock (green lines) at each time period, if the real scenario occurs, with (continuous line) and without (dashed line) redistribution, in Madrid, for LC-graph and objective Φ Regret 2 (left) and for C-graph and objective Φ 1 (right).

Figure 5 .
Figure 5. Non-covered demand (red lines) and available stock (green lines) at each time period, if the real scenario occurs, with (continuous line) and without (dashed line) redistribution, in Andalucía, for LC-graph and objective function Φ 4 (left) and for C-graph and objective function Φ Regret3

Figure 7 . 3 ,
Figure 7. Amount of redistributed stock throught the C-graphs, at each time period, for the objective function Φ Regret 3 , for the region of Madrid (left) and the region of Andalucía (right).

Figure 8 .
Figure 8. Distribution of proportion of extra stock in the provinces of Andalucía: by population (left), by our model for LC-graph and Φ 4 (center), and C-graph and Φ Regret4

Figure 10 .
Figure 10.Non-covered demand (red lines) and available stock (green lines) at each time period, if the optimistic (left), real (center) or pessimistic (left) scenario occurs, with (continuous line) and without (dashed line) redistribution, in Andalucía, for C-graph and objective function Φ 4 .

Figure 12 .
Figure 12.Non-covered demand in Andalucía at each time period for the LCgraph (red) and C-graph (blue), for objective functions Φ 2 (left) and Φ 4 (right), if the real scenario occurs when considereing redistribution.

Figure 13 .
Figure 13.Non-covered demand in Madrid, at each time period, for the regret (dashed line) and not regret (continuous line) versions of objective functions Φ 2 (left) and Φ 4 (right), for the LC-graph (left) and C-graph (right) if the real scenario occurs when considereing redistribution.

Figure 14 .
Figure 14.Non-covered demand in Andalucía, at each time period, for the regret (dashed line) and not regret (continuous line) versions of objective functions Φ 4 (left) and Φ 2 (right), for the LC-graph (right) and C-graph (left) if the real scenario occurs when considereing redistribution.
Amount of redistributed stock throught the LC-graphs, at each time period, for the objective function Φ 3 , for the region of Madrid (left) and the region of Andalucía (right).