Performance Issue with Particle Swarm Optimization for VRP

I am a computer science student and currently working on a Vehicle Routing Problem (VRP) using Particle Swarm Optimization (PSO). I am following the approach outlined in the research paper titled “Particle swarm optimization and two solution representations for solving the capacitated vehicle routing problem” by The Jin Ai and Voratas Kachitvichyanuku (DOI: https://doi.org/10.1016/j.cie.2008.06.012).

In my implementation, I have modified the solution representation to include pick-up (.1) and drop-off (.2) points. Given a scenario with 7 customers and 3 vehicles, the initial input is a list of randomly assigned numbers to represent the population (e.g., [[[1, 0, 1, 0, 0, 0, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1, 0, 0]], more particles…]). I have also implemented a function to format the population into a more readable format (e.g., [[{‘1.1’: [datetime.time(0, 15), ‘Depart Location’, PassengerNo, UserID], ‘1.2’: [datetime.time(1, 15), ‘Arrival Location’, PassengerNo, UserID], …}, {…}, {…}]])

Next, I create a customer priority and vehicle priority matrix. The output is as follows:
Customer Priority: [[‘2’, ‘3’, ‘4’, ‘7’, ‘5’, ‘1’, ‘6’]]
Vehicle Priority: [[[2, 1, 0], [0, 1, 2], [1, 0, 2], [0, 1, 2], [0, 1, 2], [1, 0, 2], [0, 1, 2]]]


The customer priority is determined by computing the distance between each customer and the depot, with the nearest customer served first. Each vehicle is then randomly assigned a number based on its latitude and longitude relative to the depot, and the distance between it and the customer is computed to determine the order in which vehicles fetch customers.

When constructing the route, I serve each customer in the priority list, get the vehicle order, and try all possible combinations of customers served by each vehicle. The cost function computes the Euclidean distance between points (e.g., depot to vehicle A to point A back to depot). In the route, the customer is placed in every position, the cost is calculated, and the minimum cost is selected (e.g., [[1,2],[3],[4]], customer 5 will try in the way of [[5,1,2],[1,5,2],[1,2,5]], [[5,3],[3,5]], [[5,4],[4,5]] and select the sequence with least cost.)

However, this approach results in an exponential increase in computation time for a single particle as the number of passengers and vehicles increases. This issue becomes even more pronounced when considering the entire population and multiple iterations to finally display the global best solution.

I am struggling with this concept and urgently need help. Any alternative approaches or ideas to improve the performance of this implementation would be greatly appreciated. Thank you in advance for your assistance.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật