main configuration / compartments / discrete compartment
Local Treatments
In the localTreatments
section the behavior of a discrete compartment can be changed during a
simulation depending on the time or the size of the compartment. Although the tag is named 'localTreatment
'
the cause of the differing behavior is not restricted to treatments only. The localTreatments
section is an optional part of the discreteCompartment
section. You will find an example for
the localTreatments
section with different defined local treatments at the
bottom of the page.
The local treatment is structured as follows. Please note that all elements have to be stated in exactly the same order as listed below.
<localTreatment> <start> </start> <end> </end> <compartmentType typeRef="typeID"/> </localTreatment>
start |
Defines the condition when the stated discrete compartment type shall be valid. Has to be a either a time or a size condition. | |
end |
optional | Defines the condition until when the stated discrete compartment type shall be valid. Has to be a
either a time or a size condition.
Please note that start and end have to be of the same condition type.
If no end condition is stated, the given discrete compartment type will be valid until the end of
the simulation or until a new local treatment becomes valid. |
compartmentType |
The discrete compartment type that shall be applied. Refers to a beforehand defined discrete compartment type. |
Condition
Local treatments become valid depending either on the time or the size of the corresponding discrete compartment.
Time Condition
<timeCondition> </timeCondition>
Unit: days
Size Condition
<sizeCondition conditionTest=" "> </sizeCondition>
Unit: number of cells.
The conditionTest
defines how the given value shall be compared. Valid values are
>=
or <
.
Since the size of a compartment can increase but also decrease over time, local treatments are checked for
validity in exactly the same order as they are stated in the localTreatments
section. This
means the second local treatment will be checked on validity only after the first local treatment has
become valid and so forth.
For this reason we recommend to use only one condition type in the whole localTreatments
section,
since it is difficult to estimating at what time a compartment will reach a specific size. Hence, use only either
time or size condition.
Sample configuration of the localTreatments
section
In this sample configuration of a localTreatments
section two different local treatments
are defined. The discrete compartment type 'type1' is applied when the compartment reaches a size of 1e9 cells.
The compartment type stays valid until the condition of the next treatment becomes valid, hence, when the
discrete compartment reaches a size of 1e10 cells. The new discrete compartment type 'type2' stays valid until
the number of cells in the compartment decreases below 10e8 cells. Then the original discrete compartment type
(not shown in the example) is applied again.
<localTreatments> <localTreatment> <start> <sizeCondition conditionTest=">=">1e9</sizeCondition> </start> <compartmentType typeRef="type1"/> </localTreatment> <localTreatment> <start> <sizeCondition conditionTest=">=">1e10</sizeCondition> </start> <end> <sizeCondition conditionTest="<">1e8</sizeCondition> </end> <compartmentType typeRef="type2"/> </localTreatment> </localTreatments>
In the second example the discrete compartment type 'type1' is applied between the days 800 and 1100. Afterwards the original discrete compartment type (not shown in the example) becomes valid again until day 1500 where the compartment type 'type2' is applied. This compartment type stays valid until the end of the simulation.
<localTreatments> <localTreatment> <start> <timeCondition>800</timeCondition> </start> <end> <timeCondition>1100</timeCondition> </end> <compartmentType typeRef="type1"/> </localTreatment> <localTreatment> <start> <timeCondition>1500</timeCondition> </start> <compartmentType typeRef="type2"/> </localTreatment> </localTreatments>