hdfhtt / CSCI3302_FSVRPLW

FSVRPLW Coding Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSCI 3302: Modified Algorithm — FSVRPLW

CSCI 3302 or Data Structures & Algorithms II is a course instructed by Dr. Nurul Liyana Binti Mohamad Zulkufli and offered by International Islamic University, Malaysia. All codes including documentation in this repository were written and prepared by Muhammad Hadif Bin Mohd Hatta (matric 2114589).

FSVRPLW stands for Flight Speed-aware Vehicle Routing Problem with Load and Wind and is one of the NP-hard problems. The dynamic programming approach to this problem is finding the optimal route that minimizes the total flight time. The payloads influences the flight speed, the heavier the weight, the slower it will be. The goal is to calculate the shortest time for the drone to deliver all the packages.

Journal Reference

Ito, S., Akaiwa, K., Funabashi, Y., Nishikawa, H., Kong, X., Taniguchi, I., & Tomiyama, H. (2022). Load and Wind Aware Routing of Delivery Drones. Drones, 6(2). https://doi.org/10.3390/drones6020050

Pseudocodes for FSVRPLW

Input: N: Number of customer, W: Payload of each customer,
 C: Coordinates of each customer, Vw: Wind Vector

Output: Optimal Route: The route that minimizes the total flight time
Wall ← ΣW

for Next ∈ C do
  FT[1 << (Next - 1)][Next] ← FlighTime(depot to Next)
  Payload[1 << (Next - 1)] ← (Wall - Wnext)
end for

for Visited ∈ 0, 1, 2, ..., (2N-1) do
  for Next ∈ C do
    if Next has not already visited then
      for Previous ∈ C do
        if Previous has been already visited then
          FT[Visited|(1 << (Next - 1))][Next] ← min(FT[Visited][Previous] +
          FlightTime(Previous to Next), FT[Visited|(1 << (Next - 1))][Next])
          Payload[Visited|(1 << (Next - 1))] ← Payload[Visited] - Wnext
        end if
      end for
    end if
  end for
end for

MIN_TIME ← INFINITE

for Previous ∈ C do
  MIN_TIME ← min(FT[2N-1][Previous] + FlighTime(Previous to depot), MIN_TIME)
end for

Coding & Known Issue

The python implementation for this dynamic programming approach can be found below:

  1. Basic algorithm - Link
  2. Modified algorithm - Link

However, the modified algorithm is not working as some part requires high levels knowledge of understanding in order to be implemented. This problem has also been issued in StackOverflow which can be found here and has been labelled as todo in the coding file. The parts related are as follow:

FT[Visited|(1 << (Next - 1))][Next] ← min(FT[Visited][Previous] + FlightTime(Previous to Next), FT[Visited|(1 << (Next - 1))][Next])

Performances

Complexity T(n)
Time ?
Space ?

* Time and space complexity are yet to be identify as the code is currently not working.

License

The project is licensed under MIT License, the terms of which are available in LICENSE.txt.

About

FSVRPLW Coding Implementation

License:MIT License


Languages

Language:Python 100.0%