mirror of
https://github.com/gsi-upm/soil
synced 2024-11-14 15:32:29 +00:00
73282530fd
All test pass, except for the TestConfig suite, which is not too critical as the plan for this version onwards is to avoid configuration as much as possible.
16 lines
531 B
Python
16 lines
531 B
Python
from soil import Environment, Simulation, CounterModel
|
|
|
|
class TorvaldsEnv(Environment):
|
|
|
|
def init(self):
|
|
self.create_network(path='torvalds.edgelist')
|
|
self.populate_network(CounterModel, skill_level='beginner')
|
|
print("Agentes: ", list(self.network_agents))
|
|
self.find_one(node_id="Torvalds").skill_level = 'God'
|
|
self.find_one(node_id="balkian").skill_level = 'developer'
|
|
|
|
|
|
sim = Simulation(name='torvalds_example',
|
|
max_steps=10,
|
|
interval=2,
|
|
model=TorvaldsEnv) |