Guest User

Untitled

a guest
May 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. Electric_car = np.array({'Nissan Leaf 24 kWh pack', 'Nissan Leaf 30 kWh pack', 'Volkswagen e-Golf','Tesla Model S 90(D)','BMW i3 22kWh','BMW i3 33 kWh','KIA SOUL','Volkswagen e-Up(2016)','Renault ZOE R90 Z.E 40','Hyundai IONIQ','Mercedes-Benz B250E','Tesla model X 90D'});
  2. RangeInKM_By_Manufacturer = np.array([199, 250, 300, 557, 190, 300, 250, 160, 403, 280, 200, 489])
  3.  
  4. City = ['city1', 'city2', 'city3', 'city4', 'city5', 'city6', 'city7', 'city8' , 'city9', 'city10', 'city11','city12', 'city13', 'city14', 'city15', 'city16', 'city17', 'city18', 'city19', 'city20]
  5. distances = [[0, 3.4, 4.5, 4, 5, 12.2, 5.4, 6.1, 5.7, 10.6, 12.8, 7.7, 7.4, 5, 12.4, 12.6, 8.7, 4.2, 3.8, 1.9],
  6. [3.4, 0, 2.2, 2.4, 4.3, 10.1, 2.8, 4.7, 4.5, 9.4, 11.6, 9.4, 9.4, 7.6, 14.6, 11.9, 8.7, 4.3, 4.5, 1.7],
  7. [4.5, 2.1, 0, 1.6, 4.5, 6.8, 1.6, 3.1, 3.8, 8.7, 11, 8.5, 9, 9.4, 17.2, 10.9, 8.1, 3.8, 4.8, 3.4],
  8. [4.1, 2, 1.6, 0, 2.7, 6.3, 1.6, 4.6, 5, 9.9, 12.1, 9.2, 9.4, 8.3, 15.9, 8.8, 9.3, 4.9, 5.2, 2.3],
  9. [5.1, 4.2, 4.5, 2.7, 0, 5.5, 3.5, 9.3, 7.5, 12.4, 14.7, 14.8, 12, 9.6, 15.8, 6.3, 11.8, 7.5, 7.8, 3.3],
  10. [12.2, 10.1, 6.8, 6.3, 5.5, 0, 5.7, 10.7, 12, 17, 19.2, 17, 17.2, 14.5, 21.9, 4.1, 16.3, 12, 14.3, 8.1],
  11. [5.4, 3.4, 1.6, 1.6, 3.5, 5.7, 0, 5.5, 5.8, 10.7, 12.9, 10.8, 10.2, 9.6, 17.2, 9, 10, 5.7, 6, 3.8],
  12. [6.1, 4.7, 3.1, 4.6, 9.3, 10.7, 5.5, 0, 4.1, 9.1, 11.3, 8.8, 10.9, 11.3, 20.8, 13.9, 8.4, 4.1, 6.4, 5.9],
  13. [5.7, 4.5, 3.8, 5, 7.5, 12, 5.8, 4.1, 0, 5.4, 7.7, 5.8, 9.4, 10.3, 17.2, 15.3, 4.8, 2.5, 5.3, 5.9],
  14. [10.6, 9.4, 8.7, 9.9, 12.4, 17, 10.7, 9.1, 5.4, 0, 2.6, 5.2, 10.2, 14.2, 20.5, 19.8, 4.1, 7.3, 9.1, 10.4],
  15. [ 12.8, 11.6, 11, 12.1, 14.7, 19.2, 12.9, 11.3, 7.7, 2.6, 0, 8.6, 13.6, 17.2, 23.6, 22.4, 6.7, 10.7, 11.9, 13],
  16. [ 7.7, 9., 8.5, 9.2, 14.8, 17, 10.8, 8.8, 5.8, 5.2, 8.6, 0, 6.6, 9.9, 17.4, 19.8, 2.3, 5, 6, 9],
  17. [7.4, 9.4, 9, 9.4, 12, 17.2, 10.2, 10.9, 9.4, 10.2, 13.6, 6.6, 0, 5.1, 9.8, 17.8, 7.9, 6.6, 5.3, 9.5],
  18. [5, 7.6, 9.4, 8.3, 9.6, 14.5, 9.6, 11.3, 10.3, 14.2, 17.2, 9.9, 5.1, 0, 8.3, 13.9, 12.1, 8.2, 7.1, 5.7],
  19. [12.4, 14.6, 17.2, 15.9, 15.8, 21.9, 17.2, 20.8, 17.2, 20.5, 23.6, 17.4, 9.8, 8.3, 0, 22.5, 18.2, 14.4, 13.2, 13.1],
  20. [12.6, 11.9, 10.9, 8.8, 6.3, 4.1, 9, 13.9, 15.3, 19.8, 22.4, 19.8, 17.8, 13.9, 22.5, 0, 19.3, 15.1, 17, 9.6],
  21. [8.7, 8.7, 8.1, 9.3, 11.8, 16.3, 10, 8.4, 4.8, 4.1, 6.7, 2.3, 7.9, 12.1, 18.2, 19.3, 0, 6.3, 6.8, 9.9],
  22. [4.2, 4.3, 3.8, 4.9, 7.5, 12, 5.7, 4.1, 2.5, 7.3, 10.7, 5, 6.6, 8.2, 14.4, 15.1, 6.3, 0, 3.2, 5],
  23. [3.8, 4.5, 4.8, 5.2, 7.8, 14.3, 6, 6.4, 5.3, 9.1, 11.9, 6, 5.3, 7.1, 13.2, 17, 6.8, 3.2, 0, 4.8],
  24. [1.9, 1.7, 3.4, 2.3, 3.3, 8.1, 3.8, 5.9, 5.9, 10.4, 13, 9, 9.5, 5.7, 13.1, 9.6, 9.9, 5, 4.8, 0]]
  25.  
  26. for EV_Start in RangeInKM_By_Manufacturer:
  27. for start_Driving in distances:
  28. Remaining_Range = [EV_Start-start_Driving]
  29. print(Remaining_Range)
Add Comment
Please, Sign In to add comment