Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j-w-yun/population_protocol_simulation
https://github.com/j-w-yun/population_protocol_simulation
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/j-w-yun/population_protocol_simulation
- Owner: j-w-yun
- Created: 2021-02-15T10:02:26.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-15T15:26:03.000Z (almost 4 years ago)
- Last Synced: 2024-03-01T05:07:40.542Z (9 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# population_protocol_simulation
Example configuration
```
init_config = {
'A': 10,
'B': 10,
'T': 0,
}
rxns = [
Rxn(reactants={'A': 1, 'B': 1,},
products={'Af': 1, 'Bf': 1,}),Rxn(reactants={'A': 1, 'Bf': 1,},
products={'A': 1, 'Af': 1,}),Rxn(reactants={'B': 1, 'Af': 1,},
products={'B': 1, 'Bf': 1,}),Rxn(reactants={'Af': 1, 'Bf': 1,},
products={'T': 2,}),Rxn(reactants={'A': 1, 'T': 1,},
products={'A': 1, 'Af': 1,}),Rxn(reactants={'B': 1, 'T': 1,},
products={'B': 1, 'Bf': 1,}),
]
sim = Sim(init_config, rxns)
```Run
```
$ python simulation.py
```