Branching Growth Model Simulation - HowTo
Compiling:
First, download the source code: source.tar to some directory. In this directory extract the files using:
Then compile the project using the following command:
I have tested the program on: phelafel (RedHat linux v7.2) and on my home computer (Mandrake linux v8.1), if you want to run it on a similar system you can use the file you downloaded. The compiler will make an executable file on the same directory, to run it, just type "./Simulation.ex"
Using the program:
When running the simulation you will see something like in fig.1.
fig. 1
Notice that on the frame titled "Controls" there's a message "Not initialized!". Before running the simulation you have to press the "Reset" button on the same frame. If you pressed it you can run the simulation by pressing the "Go!" button. If you want to learn more about the other controls read on...
There are three frames on the main window:
Those are general parameters of the simulation
Map Size this one is the size of the lattice on which the simulation takes place. It is a square lattice therefore only one number is enough. Larger lattices not only require more memory and take longer to calculate (those actually are negligible) but the main problem is that for the simulation to give interesting results you have to have high enough food concentration, which means more food particles and more walkers and those are the main time consumers in the simulation. Smaller lattices will have low resolution and will result again in uninteresting results.
Lubrication Parameter This is the number of attempts to enter a new lattice point to "lubricate" it, thus including that point to the explored colony area.
Food Token This parameter defines how much energy units a walker will receive after eating a food particle. Higher value here will result in longer lifetime, but remember that if the internal energy of the walker exceeds the "Divide Energy" he will reproduce himself and lose energy (which means shorter life time).
Divide Energy If a walker's internal energy is higher than this value the walker will reproduce. Lower value here will cause more reproduction but shorter lifetime.
The change in these parameters will take effect only after pressing the "Reset" button in the Controls frame.
The changes here only apply to the beginning of the simulation, thus will take effect only after pressing the "Reset" button.
In this frame there are the controls of the simulation.
Number of steps to simulate How many steps to simulate from the current step.
Message Area Between the "Number of steps to simulate" and the buttons line is the message area. At the beginning the message will be "Not Initialized". After pressing the "Reset" button the message will be "Initialized". While the simulation is running the message will tell which step is currently being simulated. After the simulation has stopped it will tell on which step it stopped, the number of walkers, stationary walkers (walkers with zero internal energy) and number of food particles.
Reset Initialize the simulation. After pressing this button the simulation will be initialized using the parameters specified in the "Simulation Parameters" frame and the initial conditions specified in the "Initial conditions" frame. After pressing this button the "Display" frame will appear (see fig.2 ).
Help! Pressing this button will open a window with a short explanation of the purpose of everything in the main window.
Quit This button will bring world peace.
After pressing the reset button two more button will appear:
Go! Press this button to start simulating. After pressing this button it will turn to a "Stop" button, which when pressed again will stop the simulation. The simulation will run until it finishes simulating the number of steps specified in the "Number of steps to simulate" Text-Box.
Save Press this button to save the current concentration maps to text file. The program will generate three files "Walkers.log", "Food.log" and "Agar.log", which are the walkers concentration map, the food particles concentration map and the explored area map respectively. You can then open these file with MatLab, Excel or whatever spreadsheet you like...
Draw What After pressing the "Walkers" button or the "Food" button the simulation will draw the concentration of Walkers or Food particles respectively. After pressing the "Agar" button the simulation will draw the lubricated area (the area which the colony explored). You can also press on these buttons while the simulation is running. When the simulation stops, it will automatically repaint the concentration map of the last pressed button (Walkers, Food or Agar). Its default is Walkers.
Zoom in/out Those are the two button labels '+' and '-' on the right of the display area. The zoom level is displayed on the top left corner of the display area.
Display Area In this area the simulation will draw the concentration map (After the simulation halts or after one of the "Draw what" buttons was pressed). The display area is surrounded by four arrow labeled buttons, these buttons will move the area viewed in all map directions (you can use them if the map size is larger than the displayed area). On the lower left corner appears the time step that was drawn and on the top left appears the zoom level. Right of the display area is the color bar, the numbers next to it are the lowest and highest concentration values.
fig. 2