1
0
mirror of https://github.com/gsi-upm/soil synced 2025-08-24 03:52:20 +00:00
This commit is contained in:
J. Fernando Sánchez
2023-05-03 12:14:49 +02:00
parent 5e93399d58
commit f49be3af68
38 changed files with 913 additions and 836 deletions

View File

@@ -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

View File

@@ -2,7 +2,7 @@ Welcome to Soil's documentation!
================================
Soil is an opinionated Agent-based Social Simulator in Python focused on Social Networks.
To get started developing your own simulations and agent behaviors, check out our :doc:`Tutorial <soil_tutorial>` and the `examples on GitHub <https://github.com/gsi-upm/soil/tree/master/examples>`.
To get started developing your own simulations and agent behaviors, check out our :doc:`Tutorial <tutorial/soil_tutorial>` and the `examples on GitHub <https://github.com/gsi-upm/soil/tree/master/examples>`.
Soil can be installed through pip (see more details in the :doc:`installation` page):.
@@ -49,6 +49,7 @@ If you use Soil in your research, do not forget to cite this paper:
installation
Tutorial <tutorial/soil_tutorial>
notes_v1.0
soil-vs
..

View File

@@ -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

View File

@@ -1,4 +1,8 @@
### MESA
Soil vs other ABM frameworks
============================
MESA
----
Starting with version 0.3, Soil has been redesigned to complement Mesa, while remaining compatible with it.
That means that every component in Soil (i.e., Models, Environments, etc.) can be mixed with existing mesa components.
@@ -10,3 +14,42 @@ Here are some reasons to use Soil instead of plain mesa:
- Functions to automatically populate a topology with an agent distribution (i.e., different ratios of agent class and state)
- The `soil.Simulation` class allows you to run multiple instances of the same experiment (i.e., multiple trials with the same parameters but a different randomness seed)
- Reporting functions that aggregate multiple
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:
.. |check| raw:: html
.. |uncheck| raw:: html
- |check| Integrate `soil.Simulation` with mesa's runners:
- |check| `soil.Simulation` can replace `mesa.batchrunner`
- |check| Integrate `soil.Environment` with `mesa.Model`:
- |check| `Soil.Environment` inherits from `mesa.Model`
- |check| `Soil.Environment` includes a Mesa-like Scheduler (see the `soil.time` module.
- |check| Allow for `mesa.Model` to be used in a simulation.
- |check| Integrate `soil.Agent` with `mesa.Agent`:
- |check| Rename agent.id to unique_id
- |check| mesa agents can be used in soil simulations (see `examples/mesa`)
- |check| Provide examples
- |check| Using mesa modules in a soil simulation (see `examples/mesa`)
- |uncheck| Using soil modules in a mesa simulation (see `examples/mesa`)
- |uncheck| Document the new APIs and usage

File diff suppressed because one or more lines are too long