# A Proactive Approach to Extended Vehicle Routing Problem with Drones (EVRPD)
## 6 Conclusions
**Appendix A. AMPL Model for the EVRPD (Files Ready to Use for the Gurobi Solver)**  
File r.mod  set SH;  set SP;  set SC;  set SS;  set SD;  param VS[SS];  param UA[SS];  param VC[SD];  param RA[SS,SP];  param FA[SP,SP];  param TA[SP,SP];  param MXX;  param ST;  param N_MH;  var Z[SH] >=0, binary;  var X[SH,SD,SP,SP] >=0, binary;  var Y[SH,SD,SP,SS] >=0, binary;  var FC1A;  var FC1B;  var TX;  var R[SS];  minimize fc: FC1A;  subject to C1a: sum{h in SH, d in SD, j in SP, c in SP}  FA[c,j]*X[h,d,c,j]=FC1A;  subject to C1b: sum{h in SH, d in SD, j in SP, c in SP:c<=N_MH}  X[h,d,c,j]=FC1B;  subject to C2 {h in SH, d in SD, c in SP}:  sum{j in SP} X[h,d,c,j] = sum{j in SP} X[h,d,j,c];  subject to C3 {h in SH, d in SD, c in SP, j in SP : c> N_MH and j> N_MH  and c<j}: X[h,d,c,j]<=sum{s in SS} Y[h,d,c,j,s];  subject to C4 {h in SH, d in SD, c in SP, j in SP, s in SS: c<>j}:  Y[h,d,c,j,s]<=X[h,d,c,j];  subject to C5 {h in SH, d in SD, c in SP, j in SP}:  sum{s in SS} VS[s]*Y[h,d,c,j,s]<=VC[d];  subject to C6a {s in SS, j in SP: UA[s]=1 and RA[s,j]=1}:  sum[d in SD, c in SP, h in SH] Y[h,d,c,j,s] = RA[s,j]-R[s];  subject to C6b {s in SS, j in SP: UA[s]=0}:  sum{d in SD, c in SP, h in SH} Y[h,d,c,j,s] = RA[s,j]+R[s];  subject to C7 {d in SD}:  sum{h in SH, c in SP, j in SP:c<= N_MH } X[h,d,c,j] <= 1;  subject to C8a {c in SP, s in SS: UA[s]=1}:  sum{j in SP, d in SD, h in SH: c<>j} Y[h,d,c,s]  sum{j in SP, d in SD, h in SH: c<>j} Y[h,d,c,j,s] =RA[s,c]-R[s];  subject to C8b {c in SP, s in SS: UA[s]=0}:sum{j in SP, d in SD, h in SH: c<>j} Y[h,d,j,c,s]-  sum{j in SP, d in SD, h in SH: c<j} Y[h,d,c,j,s] =-RA[s,c]+R[s];  subject to C9 {d in SD}:  sum{h in SH, c in SP, j in SP} TA[c,j]*X[h,d,c,j]<=TX;  subject to C10a {s in SS :UA[s]=1}:  sum{h in SH, d in SD, j in SP} Y[h,d,h,j,s]=1;  subject to C10b {s in SS :UA[s]=0}:  sum{h in SH, d in SD, j in SP} Y[h,d,j,h,s]=1;  subject to C11 {c in SC}:  sum{h in SH, d in SD, j in SP} X[h,d,j,c+ N_MH]=1;  subject to C12 {h in SH, d in SD, c in SP, j in SP:c<= N_MH and h<c}:  X[h,d,c,j]=0;  subject to C13 {h in SH}:  Z[h]*ST>=sum{d in SD, c in SP, j in SP} X[h,d,c,j];  subject to C14 :  MXX>=sum{h in SH} Z[h];  
FILE r.dat  data;  set SH :=1 2 3 ;  set SP :=1 2 3 4 5 6 7 8 9 10 11 12 13 ;  set SC :=1 2 3 4 5 6 7 8 9 10 ;  set SD :=1 2 3 4 ;  set SS :=1 2 3 4 5 6 7 8 9 10 ;  param VS:= 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1;  param UA:= 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1;  param VC:= 1 10 2 10 3 10 4 10;  param TX=50;  param MXX=2;  param N_MH=3;  param ST=1000;  param RA: 1 2 3 4 5 6 7 8 9 10 11 12 13:=  1 0 0 0 1 0 0 0 0 0 0 0 0 0 0  2 0 0 0 1 0 0 0 0 0 0 0 0  3 0 0 0 0 1 0 0 0 0 0 0 0  4 0 0 0 0 0 1 0 0 0 0 0 0  5 0 0 0 0 \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{FA\({}_{h,j}\)} & \multicolumn{11}{c|}{j} \\ \cline{2-13}  & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\ \hline \multirow{9}{*}{o} & 1 & 0 & 2 & 4 & 3 & 6 & 7 & 5 & 3 & 1 & 5 & 3 & 4 & 3 \\ \cline{2-13}  & 2 & 2 & 0 & 5 & 4 & 5 & 9 & 6 & 5 & 1 & 7 & 4 & 2 & 3 \\ \cline{2-13}  & 3 & 4 & 5 & 0 & 4 & 7 & 3 & 5 & 4 & 5 & 2 & 2 & 7 & 6 \\ \cline{2-13}  & 4 & 3 & 4 & 4 & 0 & 8 & 7 & 2 & 1 & 3 & 4 & 5 & 5 & 3 \\ \cline{2-13}  & 5 & 6 & 5 & 7 & 8 & 0 & 8 & 10 & 8 & 6 & 9 & 4 & 7 & 8 \\ \cline{2-13}  & 6 & 7 & 9 & 3 & 7 & 8 & 0 & 8 & 7 & 8 & 3 & 4 & 10 & 9 \\ \cline{2-13}  & 7 & 5 & 6 & 5 & 2 & 10 & 8 & 0 & 2 & 5 & 5 & 7 & 7 & 4 \\ \cline{2-13}  & 8 & 3 & 5 & 4 & 1 & 8 & 7 & 2 & 0 & 4 & 4 & 5 & 5 & 3 \\ \cline{2-13}  & 9 & 1 & 1 & 5 & 3 & 6 & 8 & 5 & 4 & 0 & 6 & 5 & 2 & 2 \\ \cline{2-13}  & 10 & 5 & 7 & 2 & 4 & 9 & 3 & 5 & 4 & 6 & 0 & 4 & 9 & 7 \\ \cline{2-13}  & 11 & 3 & 4 & 2 & 5 & 4 & 4 & 7 & 5 & 5 & 4 & 0 & 7 & 6 \\ \cline{2-13}  & 12 & 4 & 2 & 7 & 5 & 7 & 10 & 7 & 5 & 2 & 9 & 7 & 0 & 3 \\ \cline{2-13}  & 13 & 3 & 3 & 6 & 3 & 8 & 9 & 4 & 3 & 2 & 7 & 6 & 3 & 0 \\ \hline \end{tabular}   
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{TA\({}_{h,j}\)} & \multicolumn{11}{c|}{