-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.py
More file actions
31 lines (25 loc) · 783 Bytes
/
run.py
File metadata and controls
31 lines (25 loc) · 783 Bytes
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
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import yaml
import argparse
from src.env import Env
from src.multi_ue_env import MultiUeEnv
def read_file(path):
with open(path, mode='r') as file:
data = file.read()
return data
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--config', help='xml config file for simulator', type=str, action='store', required=True)
args = parser.parse_args()
# loading yaml config for simulator
config = yaml.safe_load(read_file(args.config))['scene']
print('yaml config loading done')
if config["mode"] == "multiple_ue":
env = MultiUeEnv(config)
else:
env = Env(config)
# starting the simulator
env.start()
if __name__ == "__main__":
main()