from simulation.car import spawn_drivers
from simulation.passenger import spawn_passengers
from simulation.core import World, Clock

conf = {
    "x": 100,
    "y": 100,
    "drivers": 200,
    "users": 1000,
    "start": "2019-07-08T00:00:00",
    "end": "2019-07-08T00:01:00"
}

clock = Clock(conf["start"], conf["end"])

if __name__ == '__main__':
    world = World([conf['x'], conf['y']], clock=clock)
    world.register_drivers(spawn_drivers(conf["drivers"], conf['x'], conf['y']))
    world.register_passengers(spawn_passengers(conf["users"], conf['x'], conf['y']))
    world.run(log=False)

[((14, 8, 14, 41), 'simulation.core.Clock', 'Clock', ({(14, 14, 14, 27): "conf['start']", (14, 29, 14, 40): "conf['end']"}, {}), "(conf['start'], conf['end'])", False, 'from simulation.core import World, Clock\n'), ((17, 12, 17, 54), 'simulation.core.World', 'World', (), '', False, 'from simulation.core import World, Clock\n'), ((18, 27, 18, 79), 'simulation.car.spawn_drivers', 'spawn_drivers', ({(18, 41, 18, 56): "conf['drivers']", (18, 58, 18, 67): "conf['x']", (18, 69, 18, 78): "conf['y']"}, {}), "(conf['drivers'], conf['x'], conf['y'])", False, 'from simulation.car import spawn_drivers\n'), ((19, 30, 19, 83), 'simulation.passenger.spawn_passengers', 'spawn_passengers', ({(19, 47, 19, 60): "conf['users']", (19, 62, 19, 71): "conf['x']", (19, 73, 19, 82): "conf['y']"}, {}), "(conf['users'], conf['x'], conf['y'])", False, 'from simulation.passenger import spawn_passengers\n')]