Behind the Scenes

Morpheus encodes models in its own XML format, MorpheusML. Although you don’t need to read or write XML when using Morpheus, it is good to look behind the scenes once in a while.

To see the XML of a model, right-click on the model name and select Show XML:

Show XML of a model.
Show XML of a model.

If we do this for the predator-prey model from the previous chapter (omitting Analysis), we see that it truly reflects the model as it appears in the model construction interface. It also shows that model descriptions in Morpheus are rather concise and straightforward:

<MorpheusModel version="4">
        <Details>Example showing Predator-prey model by Rosenzweig.

The Rosenzweig model is the Lotka-Volterra model with logistic growth and type 2 functional response. 

Rosenzweig, Michael. 1971. "The Paradox of Enrichment" Science Vol. 171: pp. 385–387

Illustrates how to 
- create a simple ODE model
- log and plot data as time course</Details>
        <Variable value="0.1" symbol="N"/>
        <Variable value="0.5" symbol="P"/>
        <System time-step="0.1" solver="Runge-Kutta [fixed, O(4)]">
            <Constant value="0.5" symbol="a" name="halftime"/>
            <Constant value="0.1" symbol="r" name="growth rate"/>
            <Constant value="0.1" symbol="c" name="consumption rate"/>
            <Constant value="0.05" symbol="b" name="conversion rate"/>
            <Constant value="0.01" symbol="m" name="mortality rate"/>
            <Constant value="0.8" symbol="K" name="Carrying capacity"/>
            <DiffEqn symbol-ref="N">
                <Expression>r*N*(1-N/K) - c*N / (a+N)*P
            <DiffEqn symbol-ref="P">
                <Expression>b*N / (a+N)*P - m*P</Expression>
            <!--    <Disabled>
        <Function symbol="c">
            <Expression>0.1 + time*0.00001</Expression>
        <Event trigger="when true" time-step="1">
            <Condition>N &lt; 0.001</Condition>
            <Rule symbol-ref="N">
        <Lattice class="linear">
            <Size value="1, 0, 0" symbol="size"/>
        <SpaceSymbol symbol="space"/>
        <StartTime value="0"/>
        <StopTime value="5000" symbol="stoptime"/>
        <TimeSymbol symbol="time"/>
        <Logger time-step="5">
                <Symbol symbol-ref="N"/>
                <Symbol symbol-ref="P"/>
                <TextOutput file-format="csv"/>
                <Plot time-step="-1">
                    <Style style="lines" line-width="2.0"/>
                    <Terminal terminal="png"/>
                        <Symbol symbol-ref="time"/>
                        <Symbol symbol-ref="N"/>
                        <Symbol symbol-ref="P"/>
                <Plot time-step="-1">
                    <Style style="lines" line-width="2.0"/>
                    <Terminal terminal="png"/>
                        <Symbol symbol-ref="N"/>
                        <Symbol symbol-ref="P"/>
                    <Color-bar palette="rainbow">
                        <Symbol symbol-ref="time"/>
        <ModelGraph include-tags="#untagged" reduced="false" format="svg"/>
You shouldn’t be bothered by a model’s XML. In practice, you won’t be dealing with this but you should be aware how models look like under the hood.