Tcell
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
## WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
## HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
## HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
## THINGS TO NOTICE
(suggested things for the user to notice while running the model)
## THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
## EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
## NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
## RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
## CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
breed [tcells tcell] ; The T cells breed [DCs DC] ; The dendritic cells (DCs) globals [ dt ds tcell-step nDCmeet ] ; Global variables links-own [ tDCfree ] ; Each link tracks how long a T cell is bound to a DC to setup clear-all reset-ticks ; Ensures the tick counter starts at 0 set-default-shape turtles "circle" ; All turtles will be circles (spheres) set dt 0.5 ; Each time step = 0.5 minutes set ds 8 ; 1 patch = 8 µm set tcell-step 16 / ds * dt ; Convert T cell speed to NetLogo units set nDCmeet 0 ; Initialize counter for DC-T cell encounters create-tcells 100 [ set color green ; Make T cells green setxyz random-xcor random-ycor random-zcor ; Place randomly in 3D space ] create-DCs 2 [ set size 2 ; Make DCs twice the size of T cells set color red ; Make DCs red setxyz random-xcor random-ycor random-zcor ; Place randomly in 3D space ] end to go move-tcells ; Move T cells identify-DCbound-tcells ; Identify which T cells should be bound to DCs update-link-status ; Update bound T cells and free them after 3 min tick-advance dt ; Advances time in real minutes plotxy ticks nDCmeet ; Add data to the plot end to move-tcells ask tcells [ if not any? my-links [ ; Move only if not bound to a DC right random-normal 0 90 ; Pick a random turn angle roll-right random-normal 0 90 ; Pick a random roll angle forward tcell-step ; Move forward by computed step size ] ] end to identify-DCbound-tcells ask DCs [ create-links-to tcells with [ color != blue and not any? my-links ] in-radius 2 [ ; Find unlinked T cells in range set color red ; Make the link red to show connection set tDCfree 3 ; Bind the T cell for 3 minutes ask end2 [ set color blue ; Change the T cell's color to blue while bound set nDCmeet nDCmeet + 1 ; Increase encounter count ] ] ] end to update-link-status ask links [ set tDCfree tDCfree - dt ; Reduce timer each time step if tDCfree <= 0 [ ; If 3 minutes have passed ask end2 [ set color green ] ; Turn the T cell back to green die ; Remove the link ] ] end
There is only one version of this model, created about 1 month ago by diana hasan.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Tcell.png | preview | Preview for 'Tcell' | about 1 month ago, by diana hasan | Download |
This model does not have any ancestors.
This model does not have any descendants.