"""Traffic simulator code."""

import sys
from os import path

from traffic_sim.analysis import TrafficExperiment
from traffic_sim.console import console

if not __package__:
    _path = path.realpath(path.abspath(__file__))
    sys.path.insert(0, path.dirname(path.dirname(_path)))


def main():
    """Run code from CLI."""
    console.log('traffic sim')
    num_trials = 30
    ex = TrafficExperiment(
        experiments=100,
        trials=num_trials,
        rows=10,
        cols=10,
        epochs=10,
    )
    ex.run()
    ex.analyze()


if __name__ == '__main__':
    main()

[((16, 4, 16, 30), 'traffic_sim.console.console.log', 'console.log', ({(16, 16, 16, 29): '"""traffic sim"""'}, {}), "('traffic sim')", False, 'from traffic_sim.console import console\n'), ((18, 9, 24, 5), 'traffic_sim.analysis.TrafficExperiment', 'TrafficExperiment', (), '', False, 'from traffic_sim.analysis import TrafficExperiment\n'), ((10, 26, 10, 48), 'os.path.abspath', 'path.abspath', ({(10, 39, 10, 47): '__file__'}, {}), '(__file__)', False, 'from os import path\n'), ((11, 36, 11, 55), 'os.path.dirname', 'path.dirname', ({(11, 49, 11, 54): '_path'}, {}), '(_path)', False, 'from os import path\n')]