ubc-solar-physics 1.8.1__tar.gz → 1.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/PKG-INFO +1 -1
  2. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/_version.py +2 -2
  3. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/motor/advanced_motor.py +9 -6
  4. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/motor/basic_motor.py +1 -1
  5. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/ubc_solar_physics.egg-info/PKG-INFO +1 -1
  6. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/.gitattributes +0 -0
  7. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/.github/workflows/build_and_publish.yaml +0 -0
  8. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/.github/workflows/run_tests.yaml +0 -0
  9. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/.gitignore +0 -0
  10. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/.readthedocs.yaml +0 -0
  11. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/Cargo.lock +0 -0
  12. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/Cargo.toml +0 -0
  13. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/LICENSE +0 -0
  14. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/MANIFEST.in +0 -0
  15. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/README.md +0 -0
  16. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/data.png +0 -0
  17. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/Makefile +0 -0
  18. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/_generate_version.py +0 -0
  19. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/docs_requirements.txt +0 -0
  20. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/make.bat +0 -0
  21. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/README.md +0 -0
  22. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/api.rst +0 -0
  23. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/conf.py +0 -0
  24. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/environment/gis.rst +0 -0
  25. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/environment/index.rst +0 -0
  26. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/environment/meteorology.rst +0 -0
  27. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/index.rst +0 -0
  28. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/models/arrays.rst +0 -0
  29. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/models/battery.rst +0 -0
  30. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/models/index.rst +0 -0
  31. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/models/lvs.rst +0 -0
  32. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/models/motor.rst +0 -0
  33. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/docs/source/models/regen.rst +0 -0
  34. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/battery_model_examples/battery_config.toml +0 -0
  35. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/battery_model_examples/battery_model_example.py +0 -0
  36. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/battery_model_examples/current.csv +0 -0
  37. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/battery_model_examples/data_py.png +0 -0
  38. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/battery_model_examples/data_rust.png +0 -0
  39. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/battery_model_examples/voltage.csv +0 -0
  40. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/data_query/current.csv +0 -0
  41. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/data_query/poetry.lock +0 -0
  42. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/data_query/pyproject.toml +0 -0
  43. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/data_query/query_data.py +0 -0
  44. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/data_query/voltage.csv +0 -0
  45. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/kalman_filter_examples/battery_config.toml +0 -0
  46. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/kalman_filter_examples/current.csv +0 -0
  47. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/kalman_filter_examples/kalman_filter_example.py +0 -0
  48. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/examples/kalman_filter_examples/voltage.csv +0 -0
  49. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/__init__.py +0 -0
  50. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/__init__.py +0 -0
  51. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/environment.rs +0 -0
  52. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/gis/__init__.py +0 -0
  53. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/gis/base_gis.py +0 -0
  54. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/gis/gis.py +0 -0
  55. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/gis/gis.rs +0 -0
  56. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/gis.rs +0 -0
  57. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/meteorology/__init__.py +0 -0
  58. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/meteorology/base_meteorology.py +0 -0
  59. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/meteorology/clouded_meteorology.py +0 -0
  60. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/meteorology/irradiant_meteorology.py +0 -0
  61. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/meteorology/meteorology.rs +0 -0
  62. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment/meteorology.rs +0 -0
  63. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/environment.rs +0 -0
  64. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/lib.rs +0 -0
  65. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/__init__.py +0 -0
  66. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/arrays/__init__.py +0 -0
  67. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/arrays/arrays.rs +0 -0
  68. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/arrays/base_array.py +0 -0
  69. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/arrays/basic_array.py +0 -0
  70. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/arrays.rs +0 -0
  71. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/__init__.py +0 -0
  72. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/base_battery.py +0 -0
  73. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/basic_battery.py +0 -0
  74. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/battery.rs +0 -0
  75. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/battery_config.py +0 -0
  76. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/battery_config.toml +0 -0
  77. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/battery_model.py +0 -0
  78. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery/kalman_filter.py +0 -0
  79. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/battery.rs +0 -0
  80. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/constants.py +0 -0
  81. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/lvs/__init__.py +0 -0
  82. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/lvs/base_lvs.py +0 -0
  83. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/lvs/basic_lvs.py +0 -0
  84. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/lvs/lvs.rs +0 -0
  85. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/lvs.rs +0 -0
  86. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/motor/__init__.py +0 -0
  87. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/motor/base_motor.py +0 -0
  88. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/motor/motor.rs +0 -0
  89. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/motor.rs +0 -0
  90. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/regen/__init__.py +0 -0
  91. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/regen/base_regen.py +0 -0
  92. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/regen/basic_regen.py +0 -0
  93. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/regen/regen.rs +0 -0
  94. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models/regen.rs +0 -0
  95. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics/models.rs +0 -0
  96. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/physics_rs/__init__.pyi +0 -0
  97. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/pyproject.toml +0 -0
  98. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/setup.cfg +0 -0
  99. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/tests/battery_config.toml +0 -0
  100. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/tests/gis_tests/test_calculate_driving_speeds.py +0 -0
  101. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/tests/gis_tests/test_gis_driving_speeds.py +0 -0
  102. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/tests/kalman_filter_tests/test_basic_kalman_filter.py +0 -0
  103. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/tests/test_versioning.py +0 -0
  104. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/ubc_solar_physics.egg-info/SOURCES.txt +0 -0
  105. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/ubc_solar_physics.egg-info/dependency_links.txt +0 -0
  106. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/ubc_solar_physics.egg-info/requires.txt +0 -0
  107. {ubc_solar_physics-1.8.1 → ubc_solar_physics-1.8.2}/ubc_solar_physics.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ubc-solar-physics
3
- Version: 1.8.1
3
+ Version: 1.8.2
4
4
  Summary: UBC Solar's Simulation Environment
5
5
  Author: Fisher Xue, Mihir Nimgade, Chris Chang, David Widjaja, Justin Hua, Ilya Veksler, Renu Rajamagesh, Ritchie Xia, Erik Langille, Chris Aung, Nicolas Ric, Ishaan Trivedi, Jason Liang, Felix Toft, Mack Wilson, Jonah Lee, Tamzeed Quazi, Joshua Riefman
6
6
  Author-email: UBC Solar <strategy@ubcsolar.com>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.8.1'
16
- __version_tuple__ = version_tuple = (1, 8, 1)
15
+ __version__ = version = '1.8.2'
16
+ __version_tuple__ = version_tuple = (1, 8, 2)
@@ -7,9 +7,9 @@ from physics.models.motor import BasicMotor
7
7
  class AdvancedMotor(BasicMotor):
8
8
  def __init__(self, **kwargs):
9
9
  super().__init__(**kwargs)
10
- self.cornering_coefficient = 15 # tuned to Day 1 and 3 FSGP data
10
+ self.cornering_coefficient = 30 # tuned to Day 1 and 3 FSGP data
11
11
 
12
- def calculate_energy_in(self, required_speed_kmh, gradients, wind_speeds, tick, coords):
12
+ def calculate_energy_in(self, required_speed_kmh, gradients, wind_speeds, tick, coords, plotting=False):
13
13
  """
14
14
  A function which takes in array of elevation, array of wind speed, required
15
15
  speed, returns the consumed energy.
@@ -19,11 +19,11 @@ class AdvancedMotor(BasicMotor):
19
19
  :param np.ndarray wind_speeds: (float[N]) speeds of wind in m/s, where > 0 means against the direction of the vehicle
20
20
  :param float tick: length of 1 update cycle in seconds
21
21
  :param np.ndarray coords: ([float[N,2]) The lat,lon coordinate of the car at each tick
22
- :returns: (float[N]) energy expended by the motor at every tick
22
+ :returns: (float[N] , float[N,3]) energy expended by the motor at every tick
23
23
  :rtype: np.ndarray
24
24
 
25
25
  """
26
- net_force, required_angular_speed_rads = self.calculate_net_force(required_speed_kmh, wind_speeds, gradients)
26
+ net_force, required_angular_speed_rads, road_friction_array, drag_forces, g_forces = self.calculate_net_force(required_speed_kmh, wind_speeds, gradients)
27
27
 
28
28
  cornering_work = self.calculate_cornering_losses(required_speed_kmh, coords, tick)
29
29
 
@@ -39,8 +39,11 @@ class AdvancedMotor(BasicMotor):
39
39
  motor_controller_input_energies = np.where(motor_controller_input_energies > 0,
40
40
  motor_controller_input_energies, 0)
41
41
 
42
- return motor_controller_input_energies
43
-
42
+ if plotting:
43
+ return motor_controller_input_energies, cornering_work, gradients, road_friction_array, drag_forces, g_forces
44
+ else:
45
+ return motor_controller_input_energies
46
+
44
47
  def calculate_cornering_losses(self, required_speed_kmh, coords, tick):
45
48
  """
46
49
  Calculate the energy losses due to cornering based on vehicle speed and trajectory.
@@ -130,7 +130,7 @@ class BasicMotor(BaseMotor):
130
130
 
131
131
  net_force = road_friction_array + drag_forces + g_forces + acceleration_force
132
132
 
133
- return net_force, required_angular_speed_rads
133
+ return net_force, required_angular_speed_rads, road_friction_array, drag_forces, g_forces
134
134
 
135
135
  def calculate_energy_in(self, required_speed_kmh, gradients, wind_speeds, tick, **kwargs):
136
136
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ubc-solar-physics
3
- Version: 1.8.1
3
+ Version: 1.8.2
4
4
  Summary: UBC Solar's Simulation Environment
5
5
  Author: Fisher Xue, Mihir Nimgade, Chris Chang, David Widjaja, Justin Hua, Ilya Veksler, Renu Rajamagesh, Ritchie Xia, Erik Langille, Chris Aung, Nicolas Ric, Ishaan Trivedi, Jason Liang, Felix Toft, Mack Wilson, Jonah Lee, Tamzeed Quazi, Joshua Riefman
6
6
  Author-email: UBC Solar <strategy@ubcsolar.com>