-
Notifications
You must be signed in to change notification settings - Fork 37
BactAdaptable
The BactAdaptable species derives from the BactEPS species, but adds the ability to change its set of active reactions based on definable conditions. The mechanism for this switching behavior is an ON/OFF state switch, with each state having a particular set of active reactions that are set as inactive when the switch is in the opposite state. You may use local solute concentrations or agent biomass amounts as switch conditions; this example mark-up uses the local oxygen (MyO2) concentration as the switch condition.
The first part of the species mark-up proceeds as for the other types. After all possible reactions have been defined, the reactionSwitch mark-up is used to define the behavior of the switch. The first two sub-mark-ups, whenOff and whenOn, define which reactions will be active for those respective switch states. (Note that it is not necessary to explicitly set an on-state reaction as ‘inactive’ when the switch is in the off-state; the turning on and off of reactions is taken care of automatically.) Each sub mark-up also defines the lag time (switchLag) before the switch is actually put in the relevant position, and is meant to capture microbial metabolic delays. In the example above, when conditions are such that the switch should be put in the ON state, the switch will not actually occur until after a delay of 3 hours; in contrast, the switch will move to the OFF position with no delay because the parameter switchLag is 0 for the whenOff state. (Note that if a switch is triggered but not yet activated because of the lag, a reversal of conditions will cancel the switch request.) Finally, the ON/OFF states each include a color definition, which set what color the agent should be in the POV-Ray output; setting a different color for each switch state is useful in analyzing simulation output.