As in previous article, we will consider 1-D model with 2 hospitals along line with "passive" dispathcer. It means, that if no one hospital want to accept patient, dispatcher distribute patient to closest one.
Now let modify players payoff functions to foster inter-hospital collaboration for load balancing. For that purpose, we define utility function of hospital as difference between payoff to survived patient and medical expences. This payoff function encourages hospitals to take only those patients whom they can cure.
We will define $P_{m1y}$ as probability of 1-year mortality, depending on time to treatment using https://www.ahajournals.org/doi/10.1161/01.CIR.0000121424.76486.20c
$$ P_{m1y}(t) = 0.000043 \cdot x^2 + 0.0045 \cdot x + 2.86 $$
Time to treatment was calculated from symptom onset to first balloon inflation (true ischemic time). It means that time to treatment may calculated as $$ T_{treatment}(\lambda) = T_{transp}(\lambda) + T_{queue}(\lambda) + T_{surgery} $$
Let government revenue for cured patient be $ R_{cured} $.
Medical expences consist of transportation and operation costs. $$ E_{med} = C_{transp} + C_{op} $$
So modified utility function for hospital will look like:
$$ u_i = \lambda_i \cdot [(1-P_{m1y}(T_{treatment}) \cdot R_{cured} - E_{med}] $$
As in previous case, government will motivate hospitals rewarding for every cured patient. But now cured patient means patient, that survived after hospitalization and treatment.
We will use table from https://www.bmj.com/content/338/bmj.b1807 and regression to interpolate probability of mortality depending on door-to-balloon time.
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
d = 2
x = np.array(np.arange(15, 255, 15))
y = np.array([2.9, 3, 3.2, 3.5, 3.8, 4.3, 4.9, 5.6, 6.3, 7, 7.7, 8.4, 9.1, 9.7, 10.1, 10.3])
x = x[:, np.newaxis]
y = y[:, np.newaxis]
poly_features = PolynomialFeatures(degree=d)
x_poly = poly_features.fit_transform(x)
model = LinearRegression()
model.fit(x_poly, y)
xs = np.linspace(0, 300, 1000)
xs = xs[:, np.newaxis]
xs_poly = PolynomialFeatures(degree=d).fit_transform(xs)
ys = model.predict(xs_poly)
plt.scatter(x, y, s=10)
plt.plot(xs, ys, color='r')
print(model.coef_)
print(model.intercept_ )
We will define probability of mortality during treatment as $$ P_{mt}(t) = 5.82010582e^{-05} t^2 + 2.25508870e^{-02} t + 2.13785714 $$
It is also necessary to note, that some of patients, delivered to hospital may die during waiting in queue. We take this into account in the model, subtracting from the flow of patients part, that would not have been cured (however, the hospital still has expenses for them).
$$ \lambda_i^{cured} = \lambda_i \cdot (1 - P_{mt}(T_{treatment}(\lambda_i)) $$
The hospital will receive a reward for all cured patients, and spend on operating expenses. Patients who could not be cured by the hospital will also be spent on transportation.
$$ u_i = \lambda_i^{cured} \cdot (R_{cured} - E_{op}) - \lambda_i \cdot E_{op} $$
City Regulation of healthcare were reviewed in Dispathcer Notebook
It is easy to see that with low revenue, hospitals act carefully, often redirecting patients. With a high amount of remuneration, all on a turn - hospitals act greedily, taking all patients for themselves.
To assess behaviour of hospitals, we will look at global optimal solution. The primary goal of hospitals is to save the lives of patients, so we will evaluate the choice of players' strategies as the percentage of patients who were cured, among all admitted. Obviously, we need to maximize this metric. $$ G_i = \frac{\lambda_i^{cured}}{\lambda_i} $$
Next, we will look how new metric how the new metric behaves with different number of servers, the value of the flow and the chosen strategy
Obviously, with more patient flow, percentage of cured patients decreases. Also, when number of servers are different, strategies with rejection are more profitable
Now we will compare M1Y, D2B and basic model (without regulation - each arrived patient makes a profit to hospital) on proximity to optimal global solution. To achieve this, we will calculate the proportion of matching strategies with different $\mu$ and $\lambda$, varying revenue value
We can see, that for cases with same number of servers in hospitals it more profitable to use higher revenue, because hospitals will use Accept strategy (and there no needs in redirection of patients, because they can be distributed unfiromly)
For other cases, lower value of revenue stimulate hospitals to play Reject strategy, and it's rational because system need to balance patients. But, for example in case N=[3,2] nash equilibrium of base model is closer to global solution, than both modified model.
It should be noted that we are interested in the upper left corner less than the middle and lower part of the graph - with a small flow and fast treatment any strategy will cope well. Therefore, we will look at the closeness of Nash solutions to global solutions in the case of a large load - when $\lambda \geq \mu $
In conclusion note, that both of Door-to-ballon time and 1 Year Mortality regulation methods well brought the optimal solution