### Update Miscellaneous models.

parent 6f0ea6c5
 Conway's Game of Life --------------------- Classical Cellular Automaton with synchronized updates. Rules: - If alive, die when less than 2 live neighbors - If alive, survive when 2 or 3 live neighbors (no change) - If alive, die when more than 3 live neighbors - If dead, become alive when exactly 3 live neighbors Example-GameOfLife
Simulates Conway's cellular automata model "Game of Life" by 1. summing the states of neighboring cells with NeighborhoodReporter 2. based on this sum, setting the cell state using a System of (synchronously updated) Rules.
2 if((s == 1 and sum < 2), 0, if((s == 1 and sum > 3), 0, if((s == 0 and sum == 3), 1, s) ) ) if(rand_uni(0,1) > 0.75, 1, 0)

2.22 KB

 --- title: "Game of Life: Cellular Automata" date: "2019-11-10T09:58:00+01:00" toc: true menu: Built-in Examples: parent: Miscellaneous models weight: 10 weight: 510 --- ## Introduction This example models probably the best-known classic cellular automaton (CA) model: [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). It shows an alternative use of ```System``` for synchronous updating of ```Equations```. ![](game-of-life.png "Conway´s Game of Life.") ## Model description In this model, the lattice is filled with cells of size \$1\$. Each cell counts the number of neighboring cells that are 'alive' and acts accordingly. The rules that make up the Game of Life are implemented in a ```System``` of ```Equations``` in which all ```Equations``` are updated synchronously.
## Things to try - Change the ```Neighborhood``` from a Moore (2nd order) to von Neumann (1st order). \ No newline at end of file
 In Morpheus GUI: ```Examples``` → ```Miscellaneous``` → ```GameOfLife.xml```. \ No newline at end of file
 \ No newline at end of file
 --- title: "Minimal model" date: "2019-11-10T09:49:00+01:00" toc: true menu: Built-in Examples: parent: Miscellaneous models weight: 40 weight: 540 --- ## Introduction This example does nothing -- expect being the minimal valid Morpheus model. Such a model is generated when choosing ```File``` → ```New```. {{< figure library="true" src="examples/miscellaneous/minimal_model.png" lightbox="true" title="Minimal valid XML model." >}} ## Model description The basic model only includes the required nodes ```MorpheusModel```, ```Description```, ```Space``` and ```Time```. Their required nodes and attributes are added recursively, such as ```Lattice``` class and ```StopTime``` value. ## Things to try - Invalidate this minimal model by editing it (but keeping it well-formed). When opening this model in Morpheus GUI, it triggers a warning saying what went wrong and how it was solved. Check the ```Fixboard``` to see the changes that were made to the model. ## More information - FAQ: [Your first model](/faq/your-first-model/) \ No newline at end of file

8.51 KB

 In Morpheus GUI: ```File``` → ```New```. \ No newline at end of file
 Example-FrenchFlag
Wolpert L (1969). "Positional information and the spatial pattern of cellular differentiation". J. Theor. Biol. 25 (1): 1–47.
1 if(p>t1,3, if(p>t2, 2, 1))

720 Bytes

 --- title: "French Flag: Morphogen gradient" date: "2019-11-10T10:08:00+01:00" toc: true menu: Built-in Examples: parent: Miscellaneous models weight: 20 weight: 520 --- ## Introduction This example shows Wolpert's classical [French Flag model](https://en.wikipedia.org/wiki/French_flag_model). Depending on the local concentration of a morphogen, cells adopt one of three cell types based on internal thresholds. ![](french-flag.png "Wolpert´s French Flag.") ## Model description The model sets up a morphogen gradient in the \$x\$ direction as a 2D field in the ```Global``` section. Note that no diffusion is used, since we use the steady-state solution of the diffusion and degradation process with fixed boundary source. The cells in ```CellType``` register the (average) local morphogen concentration using a ```Mapper```. Based on the specified threshold values, they choose an identity \$I\$ as defined in the ```Equation```. Note that this model is not time-dependent. ```Time``` is therefore set from ```StartTime``` \$0\$ to ```StopTime``` \$0\$. ## Things to try [//]: # (- Change the physical length of the domain by editing ```Space``` → ```NodeLength``` that controls the physical size per lattice site.) - Change the model such that the morphogen gradient is set up by production and diffusion, using ```Diffusion``` and a ```System``` with ```DiffEqn```. That is, change the model into a time-dependent model. \ No newline at end of file
 In Morpheus GUI: ```Examples``` → ```Miscellaneous``` → ```FrenchFlag.xml```. \ No newline at end of file
 Example-ParticleAggregation
Shows new FlipCells plugin
2 if(s==1 and s_n > 1, 1, 0) s > 0 and rand_uni(0,1) < (1-(s_n/12)*p) if(rand_uni(0,1) < 0.10, 1, 0)
 --- title: "FlipCells: Particle Aggregation" date: "2019-11-10T10:16:00+01:00" toc: true menu: Built-in Examples: parent: Miscellaneous models weight: 30 weight: 530 --- ## Introduction This models approximates an interacting particle system (IPS) model of particle aggregation. Each black dot represents a particle that moved due to spin flips with random neighbors. The particles perform random walks in which the probability of moving depends on the number of neighboring cells. ![](particle-aggregation.png "Aggregation of moving particles.") ## Model description Each lattice site (white or black) counts the number of particles (black neighboring sites) using a ```NeighborsReporter```. The probability of movement of each particle is made dependent on its number of neighbors by using it in the ```Condition``` of ```FlipCells```. When this condition is satisfied, the particle changes positions with a random neighboring lattice site. A ```PopulationReporter``` is used to return the fraction of isolated black particles. This number is logged and plotted using the ```Logger```.
## Things to try - Change the parameter \$p\$. \ No newline at end of file
 In Morpheus GUI: ```Examples``` → ```Miscellaneous``` → ```ParticleAggregation.xml```. \ No newline at end of file

64 KB

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!