suboptimumg.compsim.custom_run#
- class suboptimumg.compsim.custom_run.CustomRun(mycar, track)[source]#
Bases:
object- comparison_track_overlays(sim_var, data_var, lat, long, use_coast=True, rotate_by_deg=0.0, show_matching_info=False, display_raw_data=False, interpolate_gaps=False, font_config=None, layout_config=None, colorbar_config=None)[source]#
Overlay plot comparing simulation results to real-world data on the track layout.
- Parameters:
sim_var (OverlayOptions) – The simulation variable to compare
data_var (npt.NDArray) – The real-world data variable to compare
lat (npt.NDArray) – Array of GPS latitudes corresponding to the data variable
long (npt.NDArray) – Array of GPS longitudes corresponding to the data variable
use_coast (bool, optional) – Whether to use coasting results from the simulation. Default is True
rotate_by_deg (float, optional) – Degrees to rotate the track plot for better visualization. Default is 0.0
show_matching_info (bool, optional) – If True, print matching information during GPS to track matching. Default is False
display_raw_data (bool, optional) – If True, plot the projected GPS data rather than the difference. Default is False
font_config (FontConfig | None, optional)
layout_config (LayoutConfig | None, optional)
colorbar_config (ColorbarConfig | None, optional)
interpolate_gaps (bool)
- Return type:
None
- run(extract_internal_data=False)[source]#
Simulates a run along the custom track. Sets the sim_results attribute for future use.
- Parameters:
extract_internal_data (bool, optional) – Whether to extract internal data during the simulation, by default False.
- Returns:
Results from running the custom track.
- Return type:
- track_overlay(var=OverlayOptions.VELOCITY, use_coast=True, rotate_by_deg=0.0, font_config=None, layout_config=None, colorbar_config=None)[source]#
Overlay plot of the custom run results on the track layout.
- Parameters:
var (OverlayOptions, optional) – The variable to overlay on the track plot. Default is velocity
use_coast (bool, optional) – Whether to use coasting results from the simulation. Default is True
rotate_by_deg (float, optional) – Degrees to rotate the track plot for better visualization. Default is 0.0
font_config (FontConfig | None, optional)
layout_config (LayoutConfig | None, optional)
colorbar_config (ColorbarConfig | None, optional)
- Return type:
Figure