Server at Davidson College
This page was automatically generated by NetLogo 5.0.4.
The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Oracle's Java site.
powered by NetLogo
view/download model file: makers_moochers_8.nlogo
We have discovered a concern about using Programmed Evolution for theophylline production in E. coli. It has to do with the ability of theophylline to freely cross the membrane of a bacterial cell that made it. The theophylline could then diffuse to a cell that does not make it, and enter that cell. The cell that did not make theo could then gain fitness (unfairly).
There are three agents:
1) Maker Cells - E. coli cells that produce theophylline
2) Moocher Cells - E. coli cells that DO NOT produce theophylline
3) Theophylline
Maker cells and moocher cells have all of the same properties with the exception of:
a) color
b) the ability to produce theophylline
*All agents have a lifespan, and will die when that runs out. Theophylline has a lifespan of about (1/3) of the cells
*The cells gain energy when theophylline is present in the cell. It takes energy to move, so every tick they slowly spend energy (but gain if theophylline is present)
*Cells reproduce when they have reached a certain threshold (user can set). Then a new cell of the same type is formed, and each cell now has half of the energy of the parent.
modifications:
*
*theo-production: controls the amount (likelihood) that a maker cell produces theophylline on any givin tick.
*diffusion-out-rate: countrols the likelihood that a theophylline will leave a cell when it is located at the membrane.
*diffusion-in-rate: controls the likelyihood that a theophylline will leave a cell when it is located at the membrane.
*initial-amount-makers: sets the amount of makers to be created at setup
*initial-amount-moochers: sets the amount of moocher cells to be created at setup
*initial-lifespan: sets the lifespan of the E. coli cells at setup
*initial-energy: sets the energy of E. coli cells at setup
*initial-theophylline: set teh amount ot theophylline to be created at setup
notice graph (plot) over time
does changing permeability of membrane help the makers or moochers?
does starting out with more makers hurt or help the moochers? who is dependent on who?
**give theophylline a faster movement outside of the cell.
uses a “membrane” to determine when the theophylline is about to pass through. Uses the cone radius feature of netlogo.
independent model.
http://modelingcommons.org/browse/one_model/3772
http://gcat.davidson.edu
http://www.bio.davidson.edu
;********************************************* ;Author: Micah Brown ;Model: Maker/Moocher Cells ;********************************************* breed [ cells cell ] breed [ theo theophylline-molecule ] turtles-own [ energy lifespan time-since-reproduction ] to setup ca setup-background setup-turtles ;turtles set up in random location, ensuring no overlaps. reset-ticks end to setup-background ask patches [ set pcolor white ] end ;------------------------------ to setup-turtles set-default-shape cells "circle 2" set-default-shape theo "lightning" create-cells (initial-amount-makers + initial-amount-moochers) [ set color black setxy random-xcor random-ycor set size 10 ifelse who < initial-amount-makers [set color red set time-since-reproduction random maker-reproduction-downtime] [set color cyan set time-since-reproduction random moocher-reproduction-downtime] set energy initial-energy set lifespan initial-lifespan ] ;overlaps handled by killing overlaping cell :/ ask turtles [ if (count turtles in-radius (size + 1) > 1) [ die ] ] create-theo initial-theophylline [ set color black setxy random-xcor random-ycor set size 3 set lifespan initial-lifespan / ( 2 / 3 ) ] end ;------------------------------ to go ;stops when everyone has died if (count cells = 0) [stop] move-turtles degredation reproduce tick end ;------------------------------ to move-turtles ask theo [ let nearest-cell min-one-of other cells [distance myself] let nearest-cell-distance distance nearest-cell ;test whether theophylline is in "membrane" 4<x<6 distance from center of cell if ( nearest-cell-distance <= 6 ) and ( nearest-cell-distance) >= 4 [ ifelse count cells in-cone 6.0 180 < 1 [if random-float 1 > probability-diffusion-out ;if facing (and moving) away from cell [ face nearest-cell fd 2 ] ] [if random-float 1 > probability-diffusion-in ;else must be facing (and moving) towards a cell [ face nearest-cell set heading heading + 180 fd 1.5 ] ] ] random-movement-theo set lifespan lifespan - 1 ] ask cells [ random-movement-cell if count cells in-radius 10.1 > 1 [ ;ensures cells don't "overlap" rt 180 fd 1 ] if color = red [ ;only makers produce theophylline if random-float 1 <= theo-production / 2 [ hatch-theo 1 [ set size 3 set color black set lifespan initial-lifespan / ( 2 / 3) ;we give theophylline a lifespan equal to (1.5) of a cell's. setxy ( xcor + (random-float (4 * sqrt 2) ) - (2 * sqrt 2) ) (ycor + (random-float (4 * sqrt 2) ) - (2 * sqrt 2) ) ] ] ] if count theo in-radius 6 > 0 [ set energy energy + log ( count theo in-radius 6 ) 2 + 1 ] ;energy gained from having theophylline is scaled logarithmically if energy >= 100 [ ;maximum energy is 100 set energy 100 ] set energy energy - .5 set lifespan lifespan - 1 set time-since-reproduction time-since-reproduction + 1 ] end ;-------------------------------------- to degredation ask cells [ if energy <= 0 [ if random 10 = 1 [die] ;randomness gives more variation ] ] ask turtles [ if lifespan <= 0 [ if random 10 = 1 [die] ] ] end ;----------------------------- to random-movement-cell with-local-randomness [ ifelse random 2 = 1 [right random 30 forward .5] [right random -30 forward .5] ] ask other theo in-radius 6 [ ; moves its theophylline contained in cell in the same direction that it just moved ifelse random 2 = 1 [right random 30 forward .5] [right random -30 forward .5]] end ;------------------------------ to random-movement-theo ifelse random 2 = 1 [right random 30 forward 1 ] [right random -30 forward 1 ] end ;-------------------------------- to reproduce ;this is an approximate for how many cells will fit into the space given the coordinates that the user sets. let carrying-capacity (max-pxcor * max-pxcor) / 50 if (count cells > carrying-capacity) [ stop ] ask cells [ if ( (color = red) and (energy >= maker-reproduction-energy-threshold) and time-since-reproduction >= maker-reproduction-downtime ) or ( (color = cyan) and (energy >= moocher-reproduction-energy-threshold) and (time-since-reproduction >= moocher-reproduction-downtime ) ) [ set time-since-reproduction 0 let child-color color let half-energy energy / 2 set energy half-energy let num-theo count theo in-radius 6 ;kills half of the theophylline in the cell (but "adds" them to the new cell, later) repeat num-theo * 0.5 [ ask one-of theo in-radius 6 [die] ] hatch-cells 1 [ set color child-color set lifespan initial-lifespan set energy half-energy set time-since-reproduction 0 while [count cells in-radius (size + 1) > 1] [ ;attempts to set child cell close to parent cell setxy xcor + ((random count cells) - (count cells) / 2 ) ycor + ((random count cells) - (count cells) / 2 ) ] hatch-theo ( num-theo / 2 ) [ set size 3 set color black ] ] ] ] end ;-----------------------------------