<?xml version="1.0" standalone="yes"?>
<!-- simple test 6: two constraints, both with root heights -->
<beast>

    <taxa id="taxa">
        <taxon id="A"/>
        <taxon id="B"/>
        <taxon id="C"/>
    </taxa>

    <taxa id="AB">
        <taxon idref="A"/>
        <taxon idref="B"/>
    </taxa>

    <taxa id="ABC">
        <taxon idref="A"/>
        <taxon idref="B"/>
        <taxon idref="C"/>
    </taxa>

    <constantSize id="constant" units="years">
        <populationSize>
            <parameter id="popSize" value="100"/>
        </populationSize>
    </constantSize>

    <coalescentTree id="startingTree">
        <constrainedTaxa>
            <taxa idref="taxa"/>
            <tmrca>
                <taxa idref="AB"/>
                <uniformDistributionModel>
                    <lower>40.0</lower>
                    <upper>100.0</upper>
                </uniformDistributionModel>
            </tmrca>
            <tmrca>
                <taxa idref="ABC"/>
                <uniformDistributionModel>
                    <lower>30.0</lower>
                    <upper>60.0</upper>
                </uniformDistributionModel>
            </tmrca>
        </constrainedTaxa>
        <constantSize idref="constant"/>
    </coalescentTree>


    <treeModel id="treeModel">
        <coalescentTree idref="startingTree"/>
        <rootHeight>
            <parameter id="treeModel.rootHeight"/>
        </rootHeight>
        <nodeHeights internalNodes="true">
            <parameter id="treeModel.internalNodeHeights"/>
        </nodeHeights>
        <nodeHeights internalNodes="true" rootNode="true">
            <parameter id="treeModel.allInternalNodeHeights"/>
        </nodeHeights>
    </treeModel>

    <tmrcaStatistic id="mAB">
        <mrca>
            <taxa idref="AB"/>
        </mrca>
        <treeModel idref="treeModel"/>
    </tmrcaStatistic>

    <tmrcaStatistic id="mABC">
        <mrca>
            <taxa idref="ABC"/>
        </mrca>
        <treeModel idref="treeModel"/>
    </tmrcaStatistic>

    <mcmc id="mcmc" chainLength="1" preBurnin="0">
        <posterior id="posterior">
            <prior id="prior">
                <uniformPrior lower="40.0" upper="100.0">
                    <tmrcaStatistic idref="mAB"/>
                </uniformPrior>
                <uniformPrior lower="30.0" upper="60.0">
                    <tmrcaStatistic idref="mABC"/>
                </uniformPrior>
            </prior>
        </posterior>

        <operators>
            <scaleOperator scaleFactor="0.75" weight="1">
                <parameter id="xx" value="10" lower="0.0" upper="100.0"/>
            </scaleOperator>
        </operators>
        <log logEvery="1000">
            <column label="Posterior" dp="4" width="12">
                <posterior idref="posterior"/>
            </column>
        </log>
    </mcmc>

    <report>
        <treeModel idref="treeModel"/>
    </report>
    
</beast>
