Cell Simulator 1.1 Documentation |
selvin@cs.virginia.edu evans@cs.virginia.edu |
Conventions: Anything in [] is optional, Anything in <> is obligatory, Anything within "" must be typed as is
Run the following commands (on a Linux system)
gunzip -c cellsim-1.1a.tar.gz | tar xvf -
cd cellsim-1.1a/threads
gmake
cd cellsim-1.1a/cellsim
gmake
Cell Simulator can be run in batch mode or display mode.
Batch mode is employed using the switch -batch Change to the cellsim directory.
Some sample programs are available in the cellsim/cpa directory.
You can run a sample program blastula.cpa using the following commands. The Cell Program Automaton file specifies the cell program in the form of
an automaton. The automaton consists of a set of states. The CPA file contains the
description of the cell states. The format of a cell-state description is as follows A sample CPA file is listed below This CPA file has only one state s1. It will show as Dark Red in the
CellSimClient Display Window. It emits 'chemA' with a concentration of 0.1.
If it senses a concentration of 'chemA' between 0 and 0,3665, it divides
axially into 2 cells with states s1 and s1.
[Also read another example in the cpa directory: blastula.cpa] The sim file contains instructions for the simulator. SIM files can be used
to test the working of your program in hostile conditions. Cell death in a
region, introduction of hostile cells etc can be done
The SIM File is organised as a set of instructions one per line.
The format of each line of the SIM file is as follows The <instruction> is executed at the specified <cycle-number>
Each succeding line must have a <cycle-number> more than or equal to that on
the previous line. Prefixing a line by # causes that line to be ignored There are four kinds of instructions This instruction creates a new cell with specified parameters. It takes
7 parameters.
cellsim [-batch]
cellsim cpa/blastula.cpa cpa/kill.sim
OR
cellsim -batch cpa/blastula.cpa cpa/kill.simViewing Results
Writing Cell Programs
CPA File
"state" <Cell-State-ID> "{"
[ "color" <R> <G> <B> ]
[ "emits" < "(" <chemical> "," <concentration> ")" >
[ < "," "(" <chemical> "," <concentration> ")" > ]
[ "transitions"
[
<
"(" <value1> "<=" <chemical> "<=" <value2> ")" >
[ "&" < "(" <value1> "<=" <chemical> "<=" <value2> ")" > ]
>
]
"->"
<
[ < "(" <state> ")" > |
< "(" <state>, <state> ")"
[ < "axis" > |
< "normal-X" > |
< "normal-Y" > |
]
>
] ";"
>
]
}
state s1 {
color 127 0 0
emits (chemA, 0.1)
transitions
(0 <= chemA <= 0.3665) -> (s1, s1) axis;
-> (s1);
}
SIM File
<cycle-number>:<instruction> [ <parameter> ... ]
This instruction kills all cells located within a specified region. A cell is within a region if the cell's center is within the region. Currently only circular regions are supported. It takes 4 parameters.
This instruction creates a specified number of cells with specified random parameters. It takes 15 parameters
This instruction ends the simulation. It takes no parameters.
EXAMPLE SIM FILE
0: new 1 0.0 0.0 0.0 1.0 0.0 0.0
0: new 2 0.1 0.0 0.0 1.0 0.0 0.0
0: random 10 1 3 -0.5 0.5 -0.5 0.5 0.0 0.0 0.02 0.06 0.0 6.283 0.0 6.283
5: kill 0.0 0.0 0.0 0.5
#8: kill 0.0 0.0 0.0 0.8
#8: kill 0.0 0.0 0.0 0.9
10: stop
University of Virginia Department of Computer Science Programming the Swarm |
|
David Evans evans@cs.virginia.edu Selvin George selvin@cs.virginia.edu |