Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.67 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Estimating the viability of a drone delivery business
  4. """
  5. import numpy as np
  6.  
  7. pi = np.pi
  8.  
  9. #City variables:
  10. pop = 750000 #number of inhabitants
  11. period = 4 #number of days between consecutive orders for household/medicine supplies
  12. area = 140 #number of square kilometers of the urban area of the city
  13. price_kwh = 0.2237 #price of 1 kWh in the city
  14. work_day = 12 #hours available for delivery
  15. k = 0.15 #fraction of people in the city that actually use the delivery service
  16.  
  17. #Drone variables:
  18. autonomy = 30 #autonomy of the drone in minutes
  19. speed = 50 #average speed of the drone in km/h
  20. bat_charge = 6000 #batery charge in mAh
  21. bat_tension = 14.8 #voltage of the battery
  22. bat_time = 1 #hours to fully charge battery
  23. price_drone = 1000 #price of 1 drone
  24.  
  25. #Consequences of city variables:
  26. radius = (area/pi)**0.5 #city approximated to a circle - radius in km
  27. mean_distance = (2/3) * radius #average distance from a point to the center of the city (km)
  28. dialy_demand = (pop*k)/period #number of deliveries needed in 1 day
  29.  
  30. #Consequences of drone variables:
  31. bat_energy = bat_charge * bat_tension/1000000 #energy of 1 full charge in kWh
  32. max_distance = 0.5 * speed * (autonomy/60) #maximum distance the delivery site can be from the center (km)
  33.  
  34. #Consequences of both drone and city:
  35. avg_delivery_time = 2*mean_distance/speed #average delivery time in hours
  36. del_p_opcy = max_distance/mean_distance #deliveries per operation cycle
  37. op_cycle = del_p_opcy*(avg_delivery_time)+bat_time #hours per operation cycle (between two charges)
  38. bat_price = bat_energy * price_kwh #price to charge 1 drone once
  39. del_per_day = (work_day/op_cycle) * del_p_opcy #deliveries a drone makes, on average, in one day
  40. energy_per_day = del_per_day * bat_energy #kwh spent per day per drone
  41. price_per_day = energy_per_day * price_kwh #money spent on charging the drone in one day
  42. drones_needed = dialy_demand/del_per_day
  43. energy_expense = price_per_day * drones_needed #total money spent on energy spent in 1 day
  44. drone_expense = price_drone * drones_needed
  45.  
  46.  
  47. time_to_break_even = 10 #days
  48.  
  49. # drone_expense + time*energy_expense = price_charged * time * (pop * k/period)
  50.  
  51. min_price_charged = (drone_expense + time_to_break_even*energy_expense)/(time_to_break_even * (pop * k/period))
  52.  
  53. print("You need to charge at least", min_price_charged, "per delivery.")
  54.  
  55. actual_price_charged = 7.9
  56. time_company = 150 #number of days of operation
  57. profit = (pop * k/period*time_company) - (drone_expense + time_company*energy_expense)
  58. average_profit = profit/time_company
  59.  
  60. print("The total profit of the undertaking would be", profit, ", and the average profit would be", average_profit, "per day.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement