1. take a matrix(n*n)
2. take n number of UAV's(drone)
3. take n no of target points(destination point where each UAV should visit and finding the shortest path) and there location'
[url removed, login to view] n no of charging stations and location
5. for each mode suppose move mode assign mode=0, recharging mode assign mode=1
6. using Dijkstra algo to find the shortest path and distance.
Assume that all the drones(UAV'S) will start from the source(0,0)
Example: first UAV1 start from the source and total two target points are there one is in position 6,3(X,Y) another position 12,4(X,Y).So it will go the nearest first and shortest path is 1-6[for this need to calculate coordinates ]after reaching the first target it will calculate the energy . for energy assume that the drone has maximum energy. Suppose if the field size is 40*38 matrix(row*col) then each drones has energy 40 grids. So the each drones total energy is 40 grids. Let assume first target distance from the source is 25 grids. So after visiting the first target the drone has remaining energy 40-25=15 grids. If the next target distance is 35 grids but the drone has only 15 grids energy left so it will not go the next target [url removed, login to view] the drone will first check the nearest charging station from the target where the drone is currently situated(like location). Suppose the nearest charging station is at 10 grids distance from the drone's current location so it will go there and change his mode and recharge his battery after recharge it will have full energy that is 40 grids then it will go next target.
If there are total two targets point and after visiting the first target then drone doesn't have sufficient energy and it will go nearest charging station to recharge his battery but after recharging also the next target is too far from the charging station that drone can't cover the second target and the charging station and second target in between there are no other charging station is available. In that case drone will change his mode to solar power [url removed, login to view] drone change his mode to solar power mode that means the drone has unlimited energy(no energy limit) then drone will just find the shortest path and visit the target.[example: assume field size 100*100 matrix drone energy is 100 grids, two targets (20,30) and another (100,100) and one charging station (2,3) suppose after visit the first target drone has remaining energy is 75 grids and next target distance is 120 grids so drone will go to charging station after charging drone has again 100 grids energy but from charging stations the next target distance is assume 140 grids and in between no charging station. In that case drone will change his mode to solar power mode so drone has unlimited energy so its will only find the shortest path and visit the target.
If there are total 2 drones and 2 target points are there so each drone will visit one target. If first drone visit the second target first then will mark there as visited so second drone will not go thereat will go the other target.
At the end final output will show all the paths for each UAV and total distance.
total distance =112.34 grids
total distance =108.34 grids
[check the upload files for algorithm and sample diagram]