# A Game Theoretic Framework for Surplus Food Distribution in Smart Cities and Beyond
## 2 Materials and Methods
### Notations and Problem Formulation  
Our model has three types of agents: (1) the _d Donors_, \(\mathbb{D}=\{\mathbb{D}_{1},\mathbb{D}_{2},\ldots,\mathbb{D}_{d}\}\), (2) the _r Receivers_, \(\mathbb{R}=\{\mathbb{R}_{1},\mathbb{R}_{2},\ldots,\mathbb{R}_{r}\}\), (3) the _v Volunteers_, \(\mathbb{V}=\{\mathbb{V}_{1},\mathbb{V}_{2},\ldots,\mathbb{V}_{v}\}\). Here, agents represent their multiple food donation, requirement, and transportation requests. Certain lists will be holding data for comparison and classification. The lists \(\mathbb{P},\mathbb{C},\mathbb{M}\) are for comparing perishable food items and storing unmatched and matched agent requests, respectively. Four lists bifurcate the food requests into _Perishable_ (\(\mathbb{P}\mathbb{F}\mathbb{D}\)) for _donors_ and \(\mathbb{P}\mathbb{F}\mathbb{R}\) for _receivers_) and _Non-Perishable_ (\(\mathbb{N}\mathbb{P}\mathbb{F}\mathbb{D}\) for _donors_ and \(\mathbb{N}\mathbb{P}\mathbb{F}\mathbb{R}\) for _receivers_) categories for prioritizing perishable food movement. The challenge here is to suggest a proper matching between these requests to execute this process with minimum manual intervention. The simplified process to achieve the same is shown in Figure 2. Certain thresholds used to tweak the system environment when required are:  
* \(T_{o}\) minutes is the minimum overlap time between a donor and a volunteer for assignment;
* \(T_{l}\)% of their travel distance is what volunteers can manage in terms of going off their route to address requests;
* \(T_{m}\) grams is the threshold meal size;
* \(T_{a}\)% of the extra donation weight required for volunteers for the smooth transportation of the donation;
* \(T_{P}^{nm}\) and \(T_{P}^{m}\) kilometers are the threshold distances that _perishable food_ can travel for without spoiling without AC in _motored_ and _non-motored_ transportation, respectively;
* \(T_{NP}\) kilometers is the threshold distance for _non-perishable food_ to travel in a _non-motored_ transportation;
* \(T_{d}\) and \(T_{r}\) minutes are the threshold times before the start and end timings for donation, respectively, during which the request is considered available for matching;
* \(T_{w}\) minutes is the threshold beyond which unaccepted matches are auto-rejected. Figure 1: Overview of the model. The agent details extracted for the matching process are as mentioned in Table 1. All requests are queued firstly into \(\mathbb{C}\), and then classified into \(\mathbb{V}\), \(\mathbb{P}\mathbb{P}\mathbb{D}\), \(\mathbb{P}\mathbb{F}\mathbb{R}\), and \(\mathbb{N}\mathbb{P}\mathbb{F}\mathbb{R}\), as in Table 2. Matching of food items is carried out internally in these groups. An additional volunteer group \(\mathbb{V}\), which is involved in the transportation of both perishable and non-perishable food items, is also present to classify the volunteer requests. Volunteer assignment for each donation request is carried out \(T_{d}\) minutes before donation and with donor-volunteer pairs having at least \(T_{o}\) minutes of availability overlap to account for real-time delays, as shown in Figure 3. Similarly, receivers are considered for matching \(T_{r}\) minutes before their requirement start time. Now say we are tracking the \(l\)th meal of the \(k\)th food type donated by the \(i\)th donor from the \(j\)th location. Let this be our virtual donor \(\mathbb{D}_{ijkl}\). \begin{table}
\begin{tabular}{l c c} \hline \hline
**Donors** & **Receivers** & **Volunteers** \\ \hline Location & Location & Route \\ Type of food to donate & Type of food required & Type of transport (motored or not) \\ Amount of food to donate & Amount of food required & Payload capacity \\ - & - & Air-conditioning status of the transport \\ Pickup date and time range & Requirement date and time range & Availability date and time range \\ Preferred receivers, if any & Preferred donors, if any & Receivers, if any \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Variables extracted for processing.