mirror of https://github.com/gsi-upm/soil
1.0pre4
parent
5e93399d58
commit
f49be3af68
@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
name: MyExampleSimulation
|
|
||||||
max_time: 50
|
|
||||||
num_trials: 3
|
|
||||||
interval: 2
|
|
||||||
model_params:
|
|
||||||
topology:
|
|
||||||
params:
|
|
||||||
generator: barabasi_albert_graph
|
|
||||||
n: 100
|
|
||||||
m: 2
|
|
||||||
agents:
|
|
||||||
distribution:
|
|
||||||
- agent_class: SISaModel
|
|
||||||
topology: True
|
|
||||||
ratio: 0.1
|
|
||||||
state:
|
|
||||||
state_id: content
|
|
||||||
- agent_class: SISaModel
|
|
||||||
topology: True
|
|
||||||
ratio: .1
|
|
||||||
state:
|
|
||||||
state_id: discontent
|
|
||||||
- agent_class: SISaModel
|
|
||||||
topology: True
|
|
||||||
ratio: 0.8
|
|
||||||
state:
|
|
||||||
state_id: neutral
|
|
||||||
prob_infect: 0.075
|
|
||||||
neutral_discontent_spon_prob: 0.1
|
|
||||||
neutral_discontent_infected_prob: 0.3
|
|
||||||
neutral_content_spon_prob: 0.3
|
|
||||||
neutral_content_infected_prob: 0.4
|
|
||||||
discontent_neutral: 0.5
|
|
||||||
discontent_content: 0.5
|
|
||||||
variance_d_c: 0.2
|
|
||||||
content_discontent: 0.2
|
|
||||||
variance_c_d: 0.2
|
|
||||||
content_neutral: 0.2
|
|
||||||
standard_variance: 1
|
|
@ -1,22 +0,0 @@
|
|||||||
Mesa compatibility
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Soil is in the process of becoming fully compatible with MESA.
|
|
||||||
The idea is to provide a set of modular classes and functions that extend the functionality of mesa, whilst staying compatible.
|
|
||||||
In the end, it should be possible to add regular mesa agents to a soil simulation, or use a soil agent within a mesa simulation/model.
|
|
||||||
|
|
||||||
This is a non-exhaustive list of tasks to achieve compatibility:
|
|
||||||
|
|
||||||
- [ ] Integrate `soil.Simulation` with mesa's runners:
|
|
||||||
- [ ] `soil.Simulation` could mimic/become a `mesa.batchrunner`
|
|
||||||
- [ ] Integrate `soil.Environment` with `mesa.Model`:
|
|
||||||
- [x] `Soil.Environment` inherits from `mesa.Model`
|
|
||||||
- [x] `Soil.Environment` includes a Mesa-like Scheduler (see the `soil.time` module.
|
|
||||||
- [ ] Allow for `mesa.Model` to be used in a simulation.
|
|
||||||
- [ ] Integrate `soil.Agent` with `mesa.Agent`:
|
|
||||||
- [x] Rename agent.id to unique_id?
|
|
||||||
- [x] mesa agents can be used in soil simulations (see `examples/mesa`)
|
|
||||||
- [ ] Provide examples
|
|
||||||
- [ ] Using mesa modules in a soil simulation
|
|
||||||
- [ ] Using soil modules in a mesa simulation
|
|
||||||
- [ ] Document the new APIs and usage
|
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
Some of these examples are close to real life simulations, whereas some others are only a demonstration of Soil's capatibilities.
|
@ -1,7 +1,7 @@
|
|||||||
from soil import Simulation
|
from soil import Simulation
|
||||||
from social_wealth import MoneyEnv, graph_generator
|
from social_wealth import MoneyEnv, graph_generator
|
||||||
|
|
||||||
sim = Simulation(name="mesa_sim", dump=False, max_steps=10, interval=2, model=MoneyEnv, parameters=dict(generator=graph_generator, N=10, width=50, height=50))
|
sim = Simulation(name="mesa_sim", dump=False, max_steps=10, model=MoneyEnv, parameters=dict(generator=graph_generator, N=10, width=50, height=50))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sim.run()
|
sim.run()
|
||||||
|
@ -1 +1 @@
|
|||||||
1.0.0rc2
|
1.0.0rc3
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
source_file: "../examples/torvalds_sim.py"
|
source_file: "../examples/torvalds_sim.py"
|
||||||
model: "TorvaldsEnv"
|
model: "TorvaldsEnv"
|
||||||
max_steps: 10
|
max_steps: 10
|
||||||
interval: 2
|
|
Loading…
Reference in New Issue