# Enhancing E-Grocery-Delivery-Network Resilience with Autonomous Delivery Robots
## 3 Problem Definition
### Chance-Constraint Model  
Our approach stemmed from the need to address the challenges posed by a 2E-VRP designed for resilient E-grocery delivery. In this context, the starting time of service at a micro hub directly influences the arrival time at a customer's location. To ensure the earliest possible service to maintain a regular customer experience, we utilized the visit time as a key performance indicator, distinct from conventional metrics like the operational time or travel time. This strategic emphasis on visit time underscores its significance in achieving our overarching goal. By integrating chance-constrained programming into our approach, we can effectively manage the uncertainty associated with travel times and customer demand, ensuring that a delivery network remains resilient and capable of consistently meeting customer expectations, even in the face of unpredictable factors. The parameters \(\tau_{ij}^{ADR}\) in constraints (15) (21) represent the stochastic travel time of an ADR, \(\rho_{ij}^{van}\) in constraint (18) represents the stochastic travel time of the van, and \(\zeta_{f}\) in constraint (27) represents the uncertain demand in our model. If we ignore the random characteristics and represent the parameters by their mean value \(\mu_{\tau_{ij}^{ADR}}\), \(\mu_{ij}^{van}\), and \(\mu_{\zeta_{f}}\)the stochastic 2E-VRP is simplified as a deterministic 2E-VRP. In our study, we assumed that \(\tau_{ij}^{ADR},\ \rho_{ij}^{ann}\) and \(\zeta_{f}\) were unknown at the time of planning but followed some known probability distributions independently and uniformly. For a given distribution of these parameters, we used chance-constrained programming (CCP) to rewrite constraints (15) (18) (21) (27), where \(\varepsilon_{\rho}^{ann},\ \varepsilon_{t}^{ADR},\varepsilon_{f}\) represented the confidence level defining the arrival-time constraint of the van, the ADR, and the unmet demand constraint of customers, respectively:  
\[\mathrm{P}\Big{\{}\Big{(}\tau\Big{|}T_{ik}^{ADR}+\tau_{ij}^{ADR}-T_{jk}^{ADR }\leq\Big{(}1-yl_{ijk}^{ADR}\Big{)}L\Big{)}\Big{\}}\ \geq 1-\varepsilon_{\tau}^{ADR}\ \forall\ i,\ j\in N_{2},\ k\in K_{ADR} \tag{41}\]  
\[\mathrm{P}\Big{\{}\Big{(}\rho\Big{|}T_{ik}^{ann}+\rho_{ij}^{ann}-T_{jk}^{can} \leq\Big{(}1-xl_{ijk}^{cum}\Big{)}L\Big{)}\Big{\}}\geq 1-\varepsilon_{\rho}^{ cum}\ \forall\ i,\ j\in N_{1},\ k\in K_{ban} \tag{42}\]  
\[\mathrm{P}\Big{\{}\Big{(}\tau\Big{|}T_{sk}^{cum}+\tau_{sf}^{ADR}+\delta_{f}y _{sf}-T_{fk}^{ADR}\leq\Big{(}1-yl_{fsk}^{ADR}\Big{)}L\Big{)}\Big{\}}\geq 1- \varepsilon_{\tau}^{ADR}\forall\ s\in\mathsf{S},f\in F \tag{43}\]  
\[\mathrm{P}\Big{\{}\Big{(}\zeta\Big{|}\sum_{k\in K_{cum}}\sum_{j\in N_{2}}H_{ ik}^{ADR}-\sum_{k\in K_{ADR}}\sum_{j\in N_{2}}\mu_{ijk}^{ADR}+u_{i}-\zeta_{i}\geq 0 \Big{)}\Big{\}}\ \geq 1-\varepsilon_{f}\ \forall\ i\in\mathsf{F} \tag{44}\]  
Constraint (41)-(44) are the chance-constraint model, which replaces the deterministic constraint. To simplify the representation of the parameters, in this paragraph, we use short notation \(\tau,\rho\) and \(\zeta\) to substitute \(\tau_{ij}^{ADR},\rho_{ij}^{ann}\) and \(\zeta_{f}\), respectively. Then, we can define \(\tau\), \(\rho\), and \(\zeta\) to follow a lognormal distribution with their means \(\mu_{\tau},\mu_{\rho}\), \(\mu_{\zeta}\), respectively, and with their standard deviations \(\sigma_{\tau},\sigma_{\rho},\sigma_{\zeta}\), respectively. The logarithm \(\log(\tau)\), \(\log(\rho)\), and \(\log(\zeta)\) are normally distributed as normal \((\mu_{\tau}^{\prime},\sigma_{\tau}^{\prime}),(\mu_{\rho}^{\prime},\sigma_{\rho} ^{\prime})\), \(\Big{(}\mu_{\zeta}^{\prime},\ \sigma_{\zeta}^{\prime})\), where \(\mu^{\prime}=log\mu-\frac{1}{2}\sigma^{\prime 2},\sigma^{\prime 2}=\log \Big{(}\frac{\mu^{2}+\sigma^{2}}{\mu^{2}}\Big{)}\). We let \(\kappa_{T}^{ADR}\), \(\kappa_{T}^{cum}\), and \(\kappa_{F}\) represent the \(Z\) value for the normal distribution corresponding to \(\varepsilon_{\tau}^{ADR}\), \(\varepsilon_{\rho}^{cum}\), and \(\varepsilon_{f}\).