Can someone help me with this problem. Firstly this is the question "Vaccine distribution is a challenging problem. The conditions for transport and storage of novel vaccines mean only one transport truck currently exists and must visit several of the main cities of the UK for 12 hours each to allow for the public to be vaccinated. Find an optimal route for the truck to take through these cities. If additional trucks could be developed for transportation how much would this lower the overall time cost?"
the total number of cities are 15. How to add 1 more truck to it. so the total number of trucks will be 2 and how to add more truck to reduce the overall time.
I want to add additional truck and how to implement the 12 hours time for each? below is my code that i have worked out.
***
# Doing our imports
import random, numpy, math, copy, matplotlib.pyplot as plt
# Randomly create some cities (these could be specified in a list of 2-d lists like a 2-d array)
#cities = [random.sample(range(100), 2) for x in range(15)];
# Fix cities to be a set list:
cities = [[56, 15], [62, 34], [46, 49], [89, 59], [3, 44], [13, 25], [13, 90], [33, 87], [87, 58], [99, 24], [19, 4], [11, 28], [4, 0], [70, 32], [80, 31]]
tour = random.sample(range(15),15);
print('Initial Guess:\n')
plt.plot([cities[tour[i % 15]][0] for i in range(16)], [cities[tour[i % 15]][1] for i in range(16)], 'xr-');
plt.show()
for temperature in numpy.logspace(0,5,num=100000)[::-1]:
[i,j] = sorted(random.sample(range(15),2));
newTour = tour[:i] + tour[j:j+1] + tour[i+1:j] + tour[i:i+1] + tour[j+1:];
if math.exp( ( sum([ math.sqrt(sum([(cities[tour[(k+1) % 15]][d] - cities[tour[k % 15]][d])**2 for d in [0,1] ])) for k in [j,j-1,i,i-1]]) - sum([math.sqrt(sum([(cities[newTour[(k+1) % 15]][d] - cities[newTour[k % 15]][d])**2 for d in [0,1] ])) for k in [j,j-1,i,i-1]])) / temperature) > random.random():
tour = copy.copy(newTour);
print('\nFinal Path:\n')
plt.plot([cities[tour[i % 15]][0] for i in range(16)], [cities[tour[i % 15]][1] for i in range(16)], 'xb-');
plt.show()
***


