mirror of
https://github.com/gsi-upm/soil
synced 2024-11-22 11:12:29 +00:00
feab0ba79e
The examples weren't being properly tested in the last commit. When we fixed that a lot of bugs in the new implementation of environment and agent were found, which accounts for most of these changes. The main difference is the mechanism to load simulations from a configuration file. For that to work, we had to rework our module loading code in `serialization` and add a `source_file` attribute to configurations (and simulations, for that matter).
8 lines
284 B
Python
8 lines
284 B
Python
from soil import Simulation
|
|
from social_wealth import MoneyEnv, graph_generator
|
|
|
|
sim = Simulation(name="mesa_sim", dump=False, max_steps=10, interval=2, model=MoneyEnv, model_params=dict(generator=graph_generator, N=10, width=50, height=50))
|
|
|
|
if __name__ == "__main__":
|
|
sim.run()
|