📄 environment.html
字号:
<html><title>The Environment File</title><body bgcolor="#FFFFFF" text="#000000" link="#0000AA" alink="#0000FF" vlink="#000044"><h2 align=center>The Environment File</h2><p>This is the setup file for the task/resource system in avida.<p>Two main keywords are used in this file, RESOURCE and REACTION. Theirformats are:<p> RESOURCE name[:flow] {name ...}<br> REACTION name task [process:...] [requisite:...]<p>Where 'name' is a unique identifier. Resources can have additional flowinformation to indicate starting amounts, inflow and outflow. Reactions arefurther described bythe task that triggers them, the processes they perform (includingresources used and the results of using them), and requisites on whenthey can occur.<p>All entries on a resource line are names of individual resources.Resources have a global quantity depleatable by all organisms. The resourcename "infinite" is used to refer to an undepleatable resource. Thefollowing chart specifies additional descriptions for resource initialization.<p><p align=center><b>Table 1: <font color="#004400">Resource Specifications</font></b><br>(<font color="#0000AA">blue</font> variables used for all resourceswhile <font color="#AA0000">red</font> variables are only used forspatial resources)<table cellpadding=4 border=2><tr><th>Argument <th>Description <th>Default<tr><td><font color="#0000AA">inflow</font> <td>The number of units of the resource that enter the population over the course of an update. For a global resource this inflow occurs evenly throughout the update, not all at once. For a spatial resource this inflow amount is added every update evenly to all grid cells in the rectangle described by the points (inflowx1,inflowy1) and (inflowx2,inflowy2). <td>0<tr><td><font color="#0000AA">outflow</font> <td>The fraction of the resource that will flow out of the population each update. As with inflow, this happens continuously over the course of the update for a global resource. In the case of a spatial resource the fraction is withdrawn each update from each cell in the rectangle described by the points (outflowx1,outflowy1) and (outflowx2,outflowy2). <td>0.0<tr><td><font color="#0000AA">initial</font> <td>The initial abundance of the resource in the population at the start of an experiment. For a spatial resource the initial amount is spread evenly to each cell in the world grid. <td>0<tr><td><font color="#0000AA">geometry</font> <td>The layout of the resource in space.<br> <b><i>global</i></b> -- the entire pool of a resource is available to all organisms<br> <b><i>grid</i></b> -- organisms can only access resources in their grid cell. Resource can not flow past the edges of the world grid. (resource will use spatial parameters)<br> <b><i>torus</i></b> -- organisms can only access resources in their grid cell. Resource can flow to the oposite edges of the world grid. (resource will use spatial parameters) <td>global<tr><td><font color="#AA0000">inflowx1</font> <td>Leftmost coordinate of the rectange where resource will flow into world grid. <td>0<tr><td><font color="#AA0000">inflowx2</font> <td>Rightmost coordinate of the rectange where resource will flow into world grid. <td>0<tr><td><font color="#AA0000">inflowy1</font> <td>Topmost coordinate of the rectange where resource will flow into world grid. <td>0<tr><td><font color="#AA0000">inflowy2</font> <td>Bottommost coordinate of the rectange where resource will flow into world grid. <td>0<tr><td><font color="#AA0000">outflowx1</font> <td>Leftmost coordinate of the rectange where resource will flow out of world grid. <td>0<tr><td><font color="#AA0000">outflowx2</font> <td>Rightmost coordinate of the rectange where resource will flow out of world grid. <td>0<tr><td><font color="#AA0000">outflowy1</font> <td>Topmost coordinate of the rectange where resource will flow out of world grid. <td>0<tr><td><font color="#AA0000">outflowy2</font> <td>Bottommost coordinate of the rectange where resource will flow out of world grid. <td>0<tr><td><font color="#AA0000">xdiffuse</font> <td>How fast material will diffuse right <i>and</i> left. This flow depends on the amount of resources in a given cell and amount in the cells to the right and left of it. (0.0 - 1.0) <td>1.0<tr><td><font color="#AA0000">xgravity</font> <td>How fast material will move to the right <i>or</i> left. This movement depends only on the amount of resource in a given cell. (-1.0 - 1.0) <td>0<tr><td><font color="#AA0000">ydiffuse</font> <td>How fast material will diffuse up <i>and</i> down. This flow depends on the amount of resources in a given cell and amount in the cells above and below it. (0.0 - 1.0) <td>1.0<tr><td><font color="#AA0000">ygravity</font> <td>How fast material will move to the up <i>or</i> down. This movement depends only on the amount of resource in a given cell. (-1.0 - 1.0) <td>0</table><p>An example of a RESOURCE statement that begins a run with a fixed amount of the(global) resource in the environment, but has no inflow or outflows is:<pre> RESOURCE glucose:initial=10000</pre>If you wanted to make this into a chemostat with a 10000 equilibriumconcentration for unused resources, you could put:<pre> RESOURCE maltose:initial=10000:inflow=100:outflow=0.01</pre>If you want a resource that exists spatially where the resource entersfrom the top and flows towards the bottom where it exits the system,you could use:<pre> RESOURCE lactose:initial=100000:inflow=100:outflow=0.1:inflowx1=0:\ inflowx2=100:inflowy1=0:inflowy2=0:outflowx1=0:outflowx2=100:\ outflowy1=100:outflowy2=100:ygravity=0.5</pre>Defining a resource with no parameters means that it will start at a zeroquantity and have no inflow or outflow. This is sometimes desirable if youwant that resource to only be present as a byproduct of a reaction.Remember, though, that you should still have an outflow rate if its ina chemostat.<p>Each reaction must have a task that triggers it. Currently, eighty taskshave been implemented, as summarized in the following table (in approximateorder of complexity):<p><p align=center><b>Table 2: <font color="#004400">Available Tasks</font></b><table cellpadding=4 border=2><tr><th>Task <th>Description<tr><td><font color="#0000AA">echo</font> <td>This task is triggered when an organism inputs a single number and outputs it without modification.<tr><td><font color="#0000AA">add</font> <td>This task is triggered when an organism inputs two numbers, sums them together, and outputs the result.<tr><td><font color="#0000AA">sub</font> <td>This task is triggered when an organism inputs two numbers, subtracts one from the other, and outputs the result.<tr><td><font color="#0000AA">not </font> <td>This task is triggered when an organism inputs a 32 bit number, toggles all of the bits, and outputs the result. This is typically done either by nanding (by use of the <tt>nand</tt> instruction) the sequence to itself, or negating it and subtracting one. The latter approach only works since numbers are stored in twos-complement notation.<tr><td><font color="#0000AA">nand </font> <td>This task is triggered when two 32 bit numbers are input, the values are "nanded" together in a bitwise fashion, and the result is output. Nand stands for "not and". The nand operation returns a zero if and only if both inputs are one; otherwise it returns a one.<tr><td><font color="#0000AA">and </font> <td>This task is triggered when two 32 bit numbers are input, the values are "anded" together in a bitwise fashion, and the result is output. The and operation returns a one if and only if both inputs are one; otherwise it returns a zero.<tr><td><font color="#0000AA">orn </font> <td>This task is triggered when two 32 bit numbers are input, the values are "orn" together in a bitwise fashion, and the result is output. The orn operation stands for or-not. It is returns true if for each bit pair one input is one <i>or</i> the other one is zero.<tr><td><font color="#0000AA">or </font> <td>This task is triggered when two 32 bit numbers are input, the values are "ored" together in a bitwise fashion, and the result is output. It returns a one if either the first input <i>or</i> the second input is a one, otherwise it returns a zero.<tr><td><font color="#0000AA">andn </font> <td>This task is triggered when two 32 bit numbers are input, the values are "andn-ed" together in a bitwise fashion, and the result is output. The andn operation stands for and-not. It only returns a one if for each bit pair one input is a one <i>and</i> the other input is not a one. Otherwise it returns a zero.<tr><td><font color="#0000AA">nor </font> <td>This task is triggered when two 32 bit numbers are input, the values are "nored" together in a bitwise fashion, and the result is output. The nor operation stands for not-or and returns a one only if both inputs are zero. Otherwise a zero is returned.<tr><td><font color="#0000AA">xor </font> <td>This task is triggered when two 32 bit numbers are input, the values
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -