ubc-solar-physics 1.8.1__cp311-cp311-win_amd64.whl → 1.8.2__cp311-cp311-win_amd64.whl

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.
physics/_version.py CHANGED
@@ -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
  """
Binary file
@@ -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>
@@ -1,6 +1,6 @@
1
- physics_rs.cp311-win_amd64.pyd,sha256=YDR8_a8qad9ZyW5eoK0vdmDIQDS8iqXH0hp3-OcMvLU,407040
1
+ physics_rs.cp311-win_amd64.pyd,sha256=gnNpJ09GT_cSMpfNqdvUE6p7br2yNZ4p5VZBy5D022s,407040
2
2
  physics/__init__.py,sha256=jRV9J_eGh0vNXEfFrILqcM6xxVjyqm3XwKAg1B1IPBs,183
3
- physics/_version.py,sha256=z45k45T6_X0hhLIMtAyl7wfAfNIQNCIJ2vK_4ZgIqTU,427
3
+ physics/_version.py,sha256=BO3RRFGXi2BJI2h7VGlfgOuagc6qsHsV3YU0VztI7VY,427
4
4
  physics/environment.rs,sha256=OghmBkvHLZvzzuVsXUmV2lR3X_tEwuB9sT2TGZLQC6E,36
5
5
  physics/lib.rs,sha256=NgFabJsnZKqZ9qWDA4xuT1vHnhai3xhn1vhSLl4-rBM,8347
6
6
  physics/models.rs,sha256=747ABP-D1XKxA6X_MNh1PbmST0zsxpxhP_pEWjbR46c,63
@@ -41,17 +41,17 @@ physics/models/lvs/base_lvs.py,sha256=kVLfGd9Qwql4-6u86uwHbJoFCgYpG07r0cAR2Ngsq3
41
41
  physics/models/lvs/basic_lvs.py,sha256=xNXeN6RGSZkJLhtcW0n2xZU6YIOT4bKUIbOFdmh4zc0,621
42
42
  physics/models/lvs/lvs.rs,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  physics/models/motor/__init__.py,sha256=Mc-_64Vfl7QGyj2TOjmkePrvW2AVhmcvfw9j6J4S1Co,192
44
- physics/models/motor/advanced_motor.py,sha256=K7FTtP72GyxLaJmnG89l4CTQLtOHSRzQY6kJBihdtOk,8954
44
+ physics/models/motor/advanced_motor.py,sha256=QJ6mphBNKrr9m8XDwLvMVLi7nDmwiu8m-pIEx_etk9Q,9199
45
45
  physics/models/motor/base_motor.py,sha256=ssIrgNZw05xidLNaoXBvld8mAhFNd6dZjLNUG6lvwJ8,115
46
- physics/models/motor/basic_motor.py,sha256=DHnfJL3Fnnjouvcrgp3HXSm5x7AThmSvcWG7SM3bzUQ,8829
46
+ physics/models/motor/basic_motor.py,sha256=9RSDus0D8kxbvvrc21gfki5BKu8SDnr5sc5oidDGv4c,8873
47
47
  physics/models/motor/motor.rs,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  physics/models/regen/__init__.py,sha256=JzyRYKwT89FQ6_p9ofCqusl2fnWGHulyiK4P4f8Lakc,126
49
49
  physics/models/regen/base_regen.py,sha256=lY44jrTSHEo8Xv7hKCjo4C3Jx0PUgilyITHwQchT2bM,101
50
50
  physics/models/regen/basic_regen.py,sha256=SZl7nj75w-3uczfNfaZAMtcC4WO8M2mTmwbnB0HmrtU,2402
51
51
  physics/models/regen/regen.rs,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  physics_rs/__init__.pyi,sha256=e34ADL3WjwR8ioVMwa0iDxgbgqUXrwNZvk_WVmrlkho,4346
53
- ubc_solar_physics-1.8.1.dist-info/LICENSE,sha256=1Vq7OikLHh7N0xsmTPHCmPkOxk1AXrMK9k1a1icQFlk,1087
54
- ubc_solar_physics-1.8.1.dist-info/METADATA,sha256=GOANklubykAnGkTZ78UkxDv6uQhprXhD46F6oyGDrm4,5144
55
- ubc_solar_physics-1.8.1.dist-info/WHEEL,sha256=JWgQ-TWZ1n0Iuc5jEQ2YgnMdnD-gLKG4Nf9GekqFXYw,101
56
- ubc_solar_physics-1.8.1.dist-info/top_level.txt,sha256=jBZ5oyp1QQOrKodHG2UH9PMPEiZtza_q3y6fp3lEmQs,19
57
- ubc_solar_physics-1.8.1.dist-info/RECORD,,
53
+ ubc_solar_physics-1.8.2.dist-info/LICENSE,sha256=1Vq7OikLHh7N0xsmTPHCmPkOxk1AXrMK9k1a1icQFlk,1087
54
+ ubc_solar_physics-1.8.2.dist-info/METADATA,sha256=1nUuilJK3t5W1k8ROtCKi39gR0ZI6st3o98DKB0PonA,5144
55
+ ubc_solar_physics-1.8.2.dist-info/WHEEL,sha256=JWgQ-TWZ1n0Iuc5jEQ2YgnMdnD-gLKG4Nf9GekqFXYw,101
56
+ ubc_solar_physics-1.8.2.dist-info/top_level.txt,sha256=jBZ5oyp1QQOrKodHG2UH9PMPEiZtza_q3y6fp3lEmQs,19
57
+ ubc_solar_physics-1.8.2.dist-info/RECORD,,