<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="4">
    <Time>
        <StartTime value="0"/>
        <StopTime value="4752">
            <Annotation>[time] = 5 min, i. e. 288 time units correspond to 24 h; total time (StopTime) of 4752 units gives 0.5 d initialization time + 16 d dynamics (1 d cell death phase after CCl_4 administration + 7 d regeneration time)</Annotation>
        </StopTime>
        <!--    <Disabled>
        <SaveInterval value="144">
            <Annotation>Save checkpoint after 0.5 d</Annotation>
        </SaveInterval>
    </Disabled>
-->
        <TimeSymbol symbol="time" name="time"/>
        <RandomSeed value="0"/>
    </Time>
    <Description>
        <Title>M9147 Liver Regeneration</Title>
        <Details>Model ID:		https://identifiers.org/morpheus/M9147
Title:		Liver Regeneration from CCl4
Authors:		S. Höhme, M. Brulport, A. Bauer, E. Bedawy, W. Schormann, M. Hermes, V. Puppe, R. Gebhardt, S. Zellmer, M. Schwarz, E. Bockamp, T. Timmel, J. G. Hengstler, D. Drasdo
Submitters:		D. Jahn, L. Brusch
Curators:		D. Jahn, L. Brusch
Date:		12.04.2024
Software:		Morpheus (open source). Download from: https://morpheus.gitlab.io
Units:		[time] = 1 d
		[space] = 3 µm
Reference:		This model reproduces a published result, originally obtained with a different simulator:
		S. Höhme, M. Brulport, A. Bauer, E. Bedawy, W. Schormann, M. Hermes, V. Puppe, R. Gebhardt, S. Zellmer, M. Schwarz, E. Bockamp, T. Timmel, J. G. Hengstler, D. Drasdo: Prediction and validation of cell alignment along microvessels as order principle to restore tissue architecture in liver regeneration. PNAS 107 (23): 10371-10376, 2010.
		https://doi.org/10.1073/pnas.0909374107
</Details>
    </Description>
    <Space>
        <SpaceSymbol symbol="l" name="location"/>
        <Lattice class="hexagonal">
            <Size symbol="size" value="200, 200, 0"/>
            <BoundaryConditions>
                <Condition type="noflux" boundary="x"/>
                <Condition type="noflux" boundary="y"/>
            </BoundaryConditions>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <Annotation>Lobule radius in 2D slice (lit.): 284.3 µm
Hexagon diameter: 284.3 µm * 2 / node.length = 190</Annotation>
            <Domain boundary-type="noflux">
                <Hexagon diameter="190"/>
            </Domain>
            <NodeLength symbol="um" value="3"/>
        </Lattice>
        <MembraneLattice>
            <Resolution value="100"/>
            <SpaceSymbol symbol="membrane"/>
        </MembraneLattice>
    </Space>
    <Global>
        <Constant symbol="apical.polarization" tags="CCl4, HCC" value="0">
            <Annotation>0: tangential
1: radial</Annotation>
        </Constant>
        <Constant symbol="node.length" name="Lattice node length in µm" value="3"/>
        <Constant symbol="node.volume" value="node.length^2 * sqrt(3)/2 * 10^-6"/>
        <Constant symbol="time_span.day" value="12 * 24">
            <Annotation>Factor to scale time from 5 min steps to 1 d</Annotation>
        </Constant>
        <Function symbol="time.days" name="Time in days">
            <Expression>time/time_span.day</Expression>
        </Function>
        <Function symbol="time.regeneration" name="Time after CCl_4 administration [d]" tags="CCl4">
            <Annotation>Time in days excluding initialization time (0 ≤ t ≤ time.cell_death). Used for plotting.</Annotation>
            <Expression>time.days - hepatocyte.time.death_start</Expression>
        </Function>
        <ConstantVector symbol="size.physical" tags="CCl4, HCC" value="size.x, size.y * sqrt(3)/2, size.z"/>
        <VectorField symbol="sinusoid" tags="CCl4, HCC" value="l - size.physical/2"/>
        <Constant symbol="membrane.apical" tags="CCl4" value="0.0">
            <Annotation>Default value for apical adhesive. Value is set per CellType.</Annotation>
        </Constant>
        <Constant symbol="hepatocyte.contactEnergy" value="-0.5">
            <Annotation>Common value for all contact energies with hepatocytes involved</Annotation>
        </Constant>
        <Constant symbol="hepatocyte.adhesionStrength" value="1.0">
            <Annotation>Common value for //CPM/Interaction/Contact/HomophilicAdhesion/@strength of all possible hepatocyte interactions</Annotation>
        </Constant>
        <Field symbol="c" name="Chemoattractant" tags="CCl4" value="0">
            <Annotation>Diffusion constant converted from cm^2/s to 3 µm^2/5 min:

10e-6 cm^2/s = 10e-6 * (10^4)^2 µm^2/s = 10e-6 * (10^4)^2 / 3^2 (3 µm)^2/s  = 10^-6 * 10^8 / 9 * 300 (3 µm)^2/5 min = 3333.3</Annotation>
            <Diffusion rate="33"/>
        </Field>
        <Field symbol="hepatocyte.lesion.pattern" name="Hepatocyte lesion pattern" tags="CCl4" value="false"/>
        <Field symbol="hepatocyte.lesion.pattern_including_cv" name="Hepatocyte lesion pattern plus CV cross section" tags="CCl4" value="false"/>
        <Constant symbol="c.decay" tags="CCl4" value="0">
            <Annotation>Global initialization of decay rate. Actual CCl4 depletion occurs only in CellType 'hepatocytes'.</Annotation>
        </Constant>
        <System time-step="mcs_duration" name="CCl4 input and induced morphogen formation, diffusion and depletion" solver="Bogacki-Shampine [adaptive, O(3)]" tags="CCl4">
            <Rule symbol-ref="hepatocyte.lesion.pattern" tags="CCl4">
                <Expression>cell.type ==  celltype.medium.id</Expression>
            </Rule>
            <Rule symbol-ref="hepatocyte.lesion.pattern_including_cv" tags="CCl4">
                <Expression>cell.type ==  celltype.medium.id or cell.type == celltype.CV.id</Expression>
            </Rule>
            <Constant symbol="c.target" tags="CCl4" value="1"/>
            <DiffEqn symbol-ref="c" tags="CCl4">
                <Expression>-c.decay*c + (c.target-c)*hepatocyte.lesion.pattern_including_cv</Expression>
            </DiffEqn>
        </System>
        <Constant symbol="c.mean_per_cell" tags="CCl4" value="0.0"/>
        <Field symbol="c.mean_per_cell.field" tags="CCl4" value="0.0"/>
        <Constant symbol="hepatocyte.location.has_contact_to_lesion" name="Contact state to lesion" value="0.0"/>
        <Constant symbol="hepatocyte.layer.self" value="0"/>
        <Constant symbol="hepatocyte.layer.neighbor" value="0"/>
        <Constant symbol="hepatocyte.time_span.cell_cycle" name="tau" tags="CCl4, HCC" value="1">
            <Annotation>Time of one cell cycle in days.</Annotation>
        </Constant>
        <Constant symbol="hepatocyte.time.death_start" tags="CCl4" value="0.5">
            <Annotation>Initialization time in days (time of CCl4 administration and full formation of the necrotic lesion).</Annotation>
        </Constant>
        <Constant symbol="hepatocyte.time.death_end" value="hepatocyte.time.death_start + hepatocyte.time_span.death"/>
        <Constant symbol="hepatocyte.time_span.death" value="1"/>
        <Constant symbol="hepatocyte.proliferation_scaling" value="1.0"/>
        <Constant symbol="hepatocyte.time_span.proliferation" value="2.9">
            <Annotation>Proliferation window</Annotation>
        </Constant>
        <Constant symbol="hepatocyte.lesion.radius" value="(149 + 23.3/2) / node.length">
            <Annotation>Radius of necrotic lesion before regeneration in NodeLengths.

149 µm = 149/3 NodeLengths (equivalent to 6.4 hepatocytes)</Annotation>
        </Constant>
        <Variable symbol="hepatocyte.lesion.nodes" value="0.0"/>
        <Mapper>
            <Annotation>Determine area of necrotic lesion by counting the nodes.</Annotation>
            <Input value="hepatocyte.lesion.pattern"/>
            <Output symbol-ref="hepatocyte.lesion.nodes" mapping="sum"/>
        </Mapper>
        <Function symbol="hepatocyte.lesion.area" name="Area of necrotic lesion [mm^2]">
            <Annotation>Convert lesion nodes to lesion area in mm^2.

Node area: (3 µm)^2 = 9 µm^2
Conversion: 1 node = 9 * 10^-6 mm^2

Area of necrotic lesion before regeneration (lit.): 0.073 mm^2</Annotation>
            <Expression>hepatocyte.lesion.nodes * node.volume</Expression>
        </Function>
        <Function symbol="hepatocyte.lesion.area_exp" name="Experiment [mm^2]">
            <Annotation>Contains the experimental values for calculating the deviations of the simulation and displaying these values in Gnuplotter.</Annotation>
            <Expression>piecewise(0.002, time.regeneration >= -0.25 &amp;&amp; time.regeneration &lt;= 0.25,
0.075, time.regeneration >= 0.75 &amp;&amp; time.regeneration &lt;= 1.25,
0.061, time.regeneration >= 1.75 &amp;&amp; time.regeneration &lt;= 2.25,
0.037, time.regeneration >= 2.75 &amp;&amp; time.regeneration &lt;= 3.25,
0.016, time.regeneration >= 3.75 &amp;&amp; time.regeneration &lt;= 4.25,
0.003, time.regeneration >= 6.75 &amp;&amp; time.regeneration &lt;= 7.25,
0.004, time.regeneration >= 7.75 &amp;&amp; time.regeneration &lt;= 8.25, 
0.002, time.regeneration >= 15.75 &amp;&amp; time.regeneration &lt;= 16.25, 0)</Expression>
        </Function>
        <Variable symbol="hepatocyte.lesion.area_error" name="Error of Lesion Area [mm^4]" value="0.0"/>
        <Event trigger="when-true" time-step="0.25 * time_span.day">
            <Annotation>Sum up square deviations from experimental values.</Annotation>
            <Condition>rint(time.regeneration*10)/10 == 0.0 || rint(time.regeneration*10)/10 == 1.0 || rint(time.regeneration*10)/10 == 2.0 || rint(time.regeneration*10)/10 == 3.0 || rint(time.regeneration*10)/10 == 4.0 || rint(time.regeneration*10)/10 == 7.0 || rint(time.regeneration*10)/10 == 8.0 || rint(time.regeneration*10)/10 == 16.0</Condition>
            <Rule symbol-ref="hepatocyte.lesion.area_error">
                <Expression>hepatocyte.lesion.area_error + (hepatocyte.lesion.area_exp - hepatocyte.lesion.area)^2</Expression>
            </Rule>
        </Event>
        <Variable symbol="cell.color" tags="CCl4" value="0"/>
    </Global>
    <CellTypes>
        <CellType class="medium" name="medium" tags="CCl4, HCC"/>
        <CellType class="biological" name="CV" tags="CCl4, HCC">
            <FreezeMotion tags="CCl4, HCC">
                <Condition>1</Condition>
            </FreezeMotion>
            <Constant symbol="cell.color" value="4">
                <Annotation>Set CV color to 5 (medium-blue) to match Höhme et al., SI Movie S9.</Annotation>
            </Constant>
        </CellType>
        <CellType class="biological" name="PV" tags="CCl4, HCC">
            <FreezeMotion tags="CCl4, HCC">
                <Condition>1</Condition>
            </FreezeMotion>
            <Constant symbol="cell.color" value="5">
                <Annotation>Set PV color to 4 (light-red) to match Höhme et al., SI Movie S9.</Annotation>
            </Constant>
        </CellType>
        <CellType class="biological" name="hepatocytes" tags="CCl4, HCC">
            <Property symbol="hepatocyte.time.birth" tags="CCl4" value="-hepatocyte.time_span.cell_cycle"/>
            <VolumeConstraint target="pi * (0.5*23.3/node.length)^2 / (sqrt(3)/2)" name="Target area (2D)" strength="1" tags="CCl4">
                <Annotation>Cell diameter (lit.): 23.3 µm

</Annotation>
            </VolumeConstraint>
            <SurfaceConstraint target="1" name="Target perimenter (2D)" strength="1" tags="CCl4" mode="aspherity"/>
            <Constant symbol="c.decay" tags="CCl4" value="0.004">
                <Annotation>CCl4 depletion occurs only in hepatocytes, i.e. CCl4 decay rate is 0 at in all other locations.</Annotation>
            </Constant>
            <Property symbol="c.mean_per_cell" name="Mean morphogen concentration per cell" tags="CCl4" value="0.0"/>
            <Mapper tags="CCl4">
                <Input value="c"/>
                <Output symbol-ref="c.mean_per_cell" mapping="average"/>
                <Output symbol-ref="c.mean_per_cell.field" mapping="average"/>
            </Mapper>
            <PropertyVector symbol="hepatocyte.sinusoid_mean" tags="CCl4" value="0.0, 0.0, 0.0"/>
            <VectorMapper tags="CCl4, HCC">
                <Input value="sinusoid"/>
                <Output symbol-ref="hepatocyte.sinusoid_mean" mapping="average"/>
            </VectorMapper>
            <MembraneProperty symbol="membrane.apical" tags="CCl4" value="0">
                <Diffusion rate="0.0"/>
            </MembraneProperty>
            <Equation symbol-ref="membrane.apical" tags="CCl4, HCC">
                <Annotation>Assign the value "1" to the MembraneProperty on apical sides (± 45°; ± π/4) of the hepatocytes. Needed for homophilic adhesion.

- Use cos() version for apical sides perpendicular to sinusoids (tangential).
- Use sin() version for apical sides parallel to sinusoids (radial).</Annotation>
                <Expression>apical.polarization == 0 ? (abs(cos(membrane.phi - hepatocyte.sinusoid_mean.phi)) &lt;= sin(pi/4) ? 1 : 0) : (abs(sin(membrane.phi - hepatocyte.sinusoid_mean.phi)) &lt;= sin(pi/4) ? 1 : 0)</Expression>
            </Equation>
            <Property symbol="hepatocyte.time.death" tags="CCl4" value="-1"/>
            <Equation symbol-ref="hepatocyte.time.death">
                <Annotation>Assign death times to all hepatocytes within lesion radius.</Annotation>
                <Expression>if(time.days >= hepatocyte.time.death_start &amp;&amp; time.days &lt; hepatocyte.time.death_end &amp;&amp; hepatocyte.sinusoid_mean.abs &lt;= hepatocyte.lesion.radius &amp;&amp; hepatocyte.time.death == -1, rand_uni(time.days, hepatocyte.time.death_end), hepatocyte.time.death)</Expression>
            </Equation>
            <CellDeath tags="CCl4">
                <Condition>hepatocyte.time.death > -1 &amp;&amp; time.days >= hepatocyte.time.death</Condition>
            </CellDeath>
            <Chemotaxis strength="10" tags="CCl4, HCC" field="c"/>
            <Property symbol="hepatocyte.location.has_contact_to_lesion" tags="CCl4" value="0.0"/>
            <NeighborhoodReporter tags="CCl4">
                <Input scaling="cell" value="(cell.type == celltype.medium.id) &amp;&amp; (local.hepatocyte.sinusoid_mean.abs &lt; 0.5*size.physical.abs/2)"/>
                <Output symbol-ref="hepatocyte.location.has_contact_to_lesion" mapping="maximum"/>
            </NeighborhoodReporter>
            <Property symbol="hepatocyte.layer.self" name="Order of hepatocyte layers" tags="CCl4" value="+1000"/>
            <Property symbol="hepatocyte.layer.neighbor" tags="CCl4" value="+1000"/>
            <NeighborhoodReporter time-step="1.0" name="Neighbour's layer" tags="CCl4">
                <Input scaling="cell" value="if(cell.type == celltype.hepatocytes.id, hepatocyte.layer.self, 5)"/>
                <Output symbol-ref="hepatocyte.layer.neighbor" mapping="minimum"/>
            </NeighborhoodReporter>
            <System time-step="1.0" solver="Euler [fixed, O(1)]" tags="CCl4">
                <Rule symbol-ref="hepatocyte.layer.self">
                    <Annotation>Determination of the proliferating cell layers</Annotation>
                    <Expression>if(hepatocyte.location.has_contact_to_lesion==1,1,hepatocyte.layer.neighbor+1)</Expression>
                </Rule>
            </System>
            <Property symbol="hepatocyte.layer" name="Hepatocyte layers" tags="CCl4" value="0.0"/>
            <Property symbol="hepatocyte.proliferation_p" name="Chance of proliferation" tags="CCl4" value="0"/>
            <System time-step="12" solver="Euler [fixed, O(1)]" tags="CCl4">
                <Rule symbol-ref="hepatocyte.proliferation_p">
                    <Annotation>Definition of the cell division probability of BrdU-positive hepatocytes depending on the the layer number.</Annotation>
                    <Expression>if(time.regeneration >= 2.9 - hepatocyte.time_span.proliferation/2 &amp;&amp; time.regeneration &lt; 2.9 + hepatocyte.time_span.proliferation/2,
if(hepatocyte.layer.self == 1, 0.3,
if(hepatocyte.layer.self == 2, 0.25,
if(hepatocyte.layer.self == 3, 0.2,
if(hepatocyte.layer.self == 4, 0.2, 0.1)))), 0)</Expression>
                </Rule>
            </System>
            <!--    <Disabled>
        <Function symbol="hepatocyte.cell_division_time">
            <Expression internal:disabled="true">time.days > hepatocyte.time.birth + hepatocyte.time_span.cell_cycle &amp;&amp; rand_uni(0,1) &lt; (hepatocyte.proliferation_scaling*hepatocyte.proliferation_p / (time_span.day/mcs_duration))</Expression>
            <Expression>hepatocyte.proliferation_p > 0 ? hepatocyte.time.birth + hepatocyte.time_span.cell_cycle + rand_uni(0,1) *  : -1</Expression>
        </Function>
    </Disabled>
-->
            <CellDivision orientation="hepatocyte.sinusoid_mean" trigger="on-change" write-log="celltype-csv" division-plane="oriented" name="proliferation w/ HSA" tags="CCl4, HCC">
                <Condition>time.days > hepatocyte.time.birth + hepatocyte.time_span.cell_cycle &amp;&amp; rand_uni(0,1) &lt; (hepatocyte.proliferation_scaling*hepatocyte.proliferation_p / (time_span.day/mcs_duration))</Condition>
                <Triggers>
                    <Rule symbol-ref="hepatocyte.time.birth">
                        <Expression>time.days</Expression>
                    </Rule>
                    <!--    <Disabled>
        <IntermediateVector symbol="hepatocyte.division_plane" value="sweep.division_plane == 0 ? hepatocyte.sinusoid_mean : rand_uni(0, 1), rand_uni(0, 1), rand_uni(0, 1)"/>
    </Disabled>
-->
                </Triggers>
                <!--    <Disabled>
        <Triggers>
            <Rule symbol-ref="hepatocyte.generation">
                <Expression>hepatocyte.generation + 1</Expression>
            </Rule>
        </Triggers>
    </Disabled>
-->
            </CellDivision>
            <Function symbol="cell.color">
                <Annotation>Set hepatocyte colors to match Höhme et al., SI Movie S9.

Color 0 (light-salmon)	: Hepatocyte standard color
Color 1 (tan1)	: Pericentral hepatocytes
Color 2 (beige)	: Necrotic hepatocytes
Color 3 (light-coral)	: Daughter hepatocytes</Annotation>
                <Expression>piecewise(1, hepatocyte.sinusoid_mean.abs &lt;= (41.2 + 2.0*23.3) / node.length,
2, hepatocyte.time.death > -1,
3, time.days >= hepatocyte.time.birth &amp;&amp; time.days &lt; hepatocyte.time.birth + 0.9, 0)</Expression>
            </Function>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction default="0.0">
            <Contact type1="hepatocytes" type2="medium" value="0"/>
            <Contact type1="hepatocytes" type2="hepatocytes" value="hepatocyte.contactEnergy">
                <HomophilicAdhesion strength="hepatocyte.adhesionStrength" adhesive="membrane.apical" tags="CCl4, HCC"/>
            </Contact>
            <Contact type1="hepatocytes" type2="CV" value="hepatocyte.contactEnergy"/>
            <Contact type1="hepatocytes" type2="PV" value="hepatocyte.contactEnergy"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration symbol="mcs_duration" value="10.0"/>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="0.4"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Order>3</Order>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <Analysis>
        <ModelGraph format="svg" reduced="false" include-tags="#untagged,CCl4"/>
        <Gnuplotter time-step="1/4 * time_span.day" decorate="false" tags="CCl4">
            <Annotation>Reproduction of SI Movie S9 from Höhme et al.

Color 0 (light-salmon)	: Hepatocyte standard color
Color 1 (beige)	: Necrotic hepatocytes
Color 2 (light-coral)	: Daughter hepatocytes
Color 3 (tan1)	: Pericentral hepatocytes
Color 4 (light-red)	: CV
Color 5 (medium-blue)	: PVs</Annotation>
            <Plot>
                <Cells value="cell.color">
                    <ColorMap adaptive-range="false">
                        <Color value="0" color="light-salmon"/>
                        <Color value="1" color="tan1"/>
                        <Color value="2" color="beige"/>
                        <Color value="3" color="light-coral"/>
                        <Color value="4" color="light-red"/>
                        <Color value="5" color="medium-blue"/>
                    </ColorMap>
                </Cells>
            </Plot>
            <Terminal name="png"/>
        </Gnuplotter>
        <Gnuplotter time-step="1/4 * time_span.day" decorate="true" tags="CCl4">
            <Terminal name="png" size="1534, 1200, 0"/>
            <Plot>
                <Cells min="0" max="5" value="hepatocyte.layer.self">
                    <ColorMap adaptive-range="false">
                        <Color value="0" color="white"/>
                        <Color value="1" color="coral"/>
                        <Color value="2" color="spring-green"/>
                        <Color value="3" color="slategrey"/>
                        <Color value="4" color="gold"/>
                        <Color value="5" color="light-turquoise"/>
                    </ColorMap>
                </Cells>
                <!--    <Disabled>
        <CellLabels fontsize="5" value="hepatocyte.layer.self"/>
    </Disabled>
-->
            </Plot>
            <Plot>
                <Cells min="0" max="0.35" value="hepatocyte.proliferation_p">
                    <ColorMap>
                        <Color value="0.3" color="red"/>
                        <Color value="0.2" color="yellow"/>
                        <Color value="0.1" color="green"/>
                        <Color value="0" color="blue"/>
                    </ColorMap>
                </Cells>
            </Plot>
            <Plot title="Apical sides">
                <Cells opacity="0.1" flooding="true" value="membrane.apical">
                    <ColorMap>
                        <Color value="0" color="gray90"/>
                        <Color value="1" color="light-green"/>
                    </ColorMap>
                </Cells>
                <!--    <Disabled>
        <CellArrows orientation="sinusoid_mean / sinusoid_mean.abs * 5"/>
    </Disabled>
-->
                <!--    <Disabled>
        <Field symbol-ref="c.mean_per_cell.field"/>
    </Disabled>
-->
                <!--    <Disabled>
        <Field symbol-ref="c"/>
    </Disabled>
-->
            </Plot>
            <!--    <Disabled>
        <Plot>
            <Cells value="c.mean_per_cell">
                <ColorMap>
                    <Color value="0" color="white"/>
                    <Color value="0.5" color="orange"/>
                    <Color value="1" color="red"/>
                </ColorMap>
            </Cells>
            <CellLabels fontsize="5" internal:disabled="true" precision="0" value="c.mean_per_cell*1000"/>
        </Plot>
    </Disabled>
-->
            <Plot>
                <Field symbol-ref="c" min="0.0" max="1.0"/>
            </Plot>
            <!--    <Disabled>
        <Plot>
            <Field symbol-ref="hepatocyte.lesion.pattern"/>
        </Plot>
    </Disabled>
-->
        </Gnuplotter>
        <Logger time-step="1/24 * time_span.day">
            <Restriction condition="time.regeneration >= 0"/>
            <Input>
                <Symbol symbol-ref="celltype.hepatocytes.size"/>
                <Symbol symbol-ref="time.days"/>
                <Symbol symbol-ref="time.regeneration"/>
                <Symbol symbol-ref="hepatocyte.lesion.area"/>
                <Symbol symbol-ref="hepatocyte.lesion.area_exp"/>
                <Symbol symbol-ref="hepatocyte.lesion.area_error"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot time-step="-1">
                    <Style line-width="1.0" style="lines"/>
                    <Terminal terminal="png"/>
                    <X-axis maximum="17.0" minimum="-1.0">
                        <Symbol symbol-ref="time.regeneration"/>
                    </X-axis>
                    <Y-axis minimum="-0.01" maximum="0.095">
                        <Symbol symbol-ref="hepatocyte.lesion.area"/>
                        <Symbol symbol-ref="hepatocyte.lesion.area_exp"/>
                    </Y-axis>
                </Plot>
                <Plot time-step="-1">
                    <Style line-width="1.0" style="lines"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="time.regeneration"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="hepatocyte.lesion.area_error"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
        <Logger time-step="0.5 * time_span.day">
            <Annotation>Separately log hepatocyte lesion error at t = 4 d for quick comparison between simulation runs.</Annotation>
            <Restriction condition="rint(time.regeneration*10)/10 == 4.0 || rint(time.regeneration*10)/10 == 6.0"/>
            <Input>
                <Symbol symbol-ref="time.regeneration"/>
                <Symbol symbol-ref="hepatocyte.lesion.area_error"/>
            </Input>
            <Output>
                <TextOutput file-name="logger-ccl4-lesion-error-4d"/>
            </Output>
        </Logger>
    </Analysis>
    <CellPopulations>
        <Population type="hepatocytes" name="Hepatocytes" size="0">
            <InitCircle name="Hepatocyte initialization" number-of-cells="675" tags="CCl4, HCC" mode="random">
                <Annotation>Hepatocyte density (lit.): 1889 cells/mm^2
Lobule area in 2D slice (lit.): 0.21 mm^2

- Hepatocyte lesion without hepatocytes, i.e. with medium only (model): 0.2043646748 mm^2 → 386 cells
- Lobule area, i.e. includung medium, hepatocytes, CV, PVs (model): 0.2132578897  mm^2 → 403 cells</Annotation>
                <Dimensions radius="size.x/2" center="size.x/2, size.y/2 * sqrt(3)/2, 0"/>
            </InitCircle>
        </Population>
        <Population type="CV" name="Central vein" size="1">
            <InitCellObjects name="Set coordinates" tags="CCl4, HCC" mode="order">
                <Annotation>Central vein radius (lit.): 41.2 µm</Annotation>
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="41.2/node.length" center="size.physical/2"/>
                </Arrangement>
            </InitCellObjects>
        </Population>
        <Population type="PV" name="Portal vein" size="1">
            <InitCellObjects name="bottom left" tags="CCl4, HCC" mode="order">
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="23.3 / node.length" center="52.5, 5 * sqrt(3)/2, 0"/>
                </Arrangement>
            </InitCellObjects>
            <InitCellObjects name="bottom right" tags="CCl4, HCC" mode="order">
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="23.3 / node.length" center="147.5, 5 * sqrt(3)/2, 0"/>
                </Arrangement>
            </InitCellObjects>
            <InitCellObjects name="mid left" tags="CCl4, HCC" mode="order">
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="23.3 / node.length" center="5, 100 * sqrt(3)/2, 0"/>
                </Arrangement>
            </InitCellObjects>
            <InitCellObjects name="mid right" tags="CCl4, HCC" mode="order">
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="23.3 / node.length" center="195, 100 * sqrt(3)/2, 0"/>
                </Arrangement>
            </InitCellObjects>
            <InitCellObjects name="upper left" tags="CCl4, HCC" mode="order">
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="23.3 / node.length" center="52.5, 195 * sqrt(3)/2, 0"/>
                </Arrangement>
            </InitCellObjects>
            <InitCellObjects name="upper right" tags="CCl4, HCC" mode="order">
                <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                    <Sphere radius="23.3 / node.length" center="147.5, 195 * sqrt(3)/2, 0"/>
                </Arrangement>
            </InitCellObjects>
        </Population>
    </CellPopulations>
</MorpheusModel>
