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)

[((289, 322), 'simulation.core.Clock', 'Clock', (["conf['start']", "conf['end']"], {}), "(conf['start'], conf['end'])\n", (294, 322), False, 'from simulation.core import World, Clock\n'), ((363, 405), 'simulation.core.World', 'World', (["[conf['x'], conf['y']]"], {'clock': 'clock'}), "([conf['x'], conf['y']], clock=clock)\n", (368, 405), False, 'from simulation.core import World, Clock\n'), ((433, 485), 'simulation.car.spawn_drivers', 'spawn_drivers', (["conf['drivers']", "conf['x']", "conf['y']"], {}), "(conf['drivers'], conf['x'], conf['y'])\n", (446, 485), False, 'from simulation.car import spawn_drivers\n'), ((517, 570), 'simulation.passenger.spawn_passengers', 'spawn_passengers', (["conf['users']", "conf['x']", "conf['y']"], {}), "(conf['users'], conf['x'], conf['y'])\n", (533, 570), False, 'from simulation.passenger import spawn_passengers\n')]