Beispiel #1
0
def run_following_distance_simulation(v_lead, t_end=100.0):
    man = Maneuver(
        '',
        duration=t_end,
        initial_speed=float(v_lead),
        lead_relevancy=True,
        initial_distance_lead=100,
        speed_lead_values=[v_lead],
        breakpoints=[0.],
    )
    valid, output = man.evaluate()
    assert valid
    return output[-1, 2] - output[-1, 1]
Beispiel #2
0
def run_cruise_simulation(cruise, t_end=100.):
  man = Maneuver(
    '',
    duration=t_end,
    initial_speed=float(0.),
    lead_relevancy=True,
    initial_distance_lead=100,
    cruise_values=[cruise],
    prob_lead_values=[0.0],
    breakpoints=[0.],
  )
  valid, output = man.evaluate()
  assert valid
  return output[-1,3]