-
Notifications
You must be signed in to change notification settings - Fork 2
/
runtime_tests.py
38 lines (32 loc) · 1.2 KB
/
runtime_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'''
Set `CHECK_MCTS` to True for the MCTS runtime check, or set `CHECK_WS` for the
receding horizon winning set synthesis runtime check.
MCTS runtime check:
- Set the desired tracklength in highway_merge/test_parameters.py
Winning set runtime check:
- Set the desired maximum track length in `Lmax` below, the minimum is set to 5.
'''
import numpy as np
import matplotlib.pyplot as plt
import time
import os
import math
import pickle
from ipdb import set_trace as st
import sys
sys.path.append('..')
from highway_merge.merge_receding_horizon_winsets import get_tester_states_in_winsets, specs_car_rh, get_winset_rh
from sim_merge import play_game
from highway_merge.test_parameters import TRACKLENGTH
from highway_merge.check_runtime import run_mcts_convergence_check, run_winning_set_filter_synthesis_runtime_check
CHECK_MCTS = True
CHECK_WS = False
if __name__ == '__main__':
if CHECK_MCTS:
# Set desired tracklength in highway_merge/test_parameters.py
rollouts_to_run = [1,2,3,4,5]
rollouts_to_run = np.linspace(1, 5, 5)
run_mcts_convergence_check(rollouts_to_run)
elif CHECK_WS:
max_tracklength = 13
run_winning_set_filter_synthesis_runtime_check(max_tracklength)