specifying events for different lifestages

5 views
Skip to first unread message

steven.wangen

unread,
Apr 11, 2010, 9:22:50 PM4/11/10
to mdig
Question regarding specifying a initial distribution plus an event for
a single lifestage - I am essentially trying to apply dispersal event
to seeds at each timestep. Right now in the model I have the xml code
below - I'm trying to specify two actions for the 'seeds' lifestage -
the first being an initial distribution with phenology=1, and the
second a dispersal event that occurs each timestep. It seems logical
to specify them separately as a way to distinguish the phenology of
the two, but it doesn't seem to be working. Am I asking too much of
the parser to interpret this? Or is there a better way to do it?

-Steve

<lifestages>
<transition>
<popMod file=...
</transition>

<!-- specify initial distribution at timestep = 1 -->
<lifestage name="seeds">
<initialDistribution region="a">
<sites>
<s x="1" y="1" count="10"/>
</sites>
</initialDistribution>
<phenology region="a">
<value>1</value>
</phenology>
</lifestage>

<!-- specify a dispersal event to occur on the same lifestage, but
with no specified phenology (every time step) -->
<lifestage name="seeds">
<phenology region="a">
</phenology>
<event name="r.mdig.neighbour">
<param name="shape">
<value>186</value>
</param>
<param name="radius">
<value>1</value>
</param>
</event>
</lifestage>

<!-- these are just to force it to acknowledge the other
lifestages -->
<lifestage name="juv_1">
<phenology region="a">
<value>2</value>
</phenology>
<event name="r.mdig.survival">
<param name="survival">
<value>100</value>
</param>
</event>
</lifestage>

<lifestage name="juv_2">
<phenology region="a">
<value>2</value>
</phenology>
<event name="r.mdig.survival">
<param name="survival">
<value>100</value>
</param>
</event>
</lifestage>
...
</lifestages>

Joel Pitt

unread,
Apr 11, 2010, 9:33:59 PM4/11/10
to mdig...@googlegroups.com
Hi Steve,

You can't specify two life-stages with the same name - each lifestage
element in the model file is the full definition for that lifestage.
I.e. it needs to contain both the initial distribution for the
lifestage AND the sequence of events that occur at each time-step. A
lifestage can't have two phenology dates...

Does it seem like the initial maps are not properly initialised?
Logically it'd make sense for the initial distributions to all be
initialised at the start of the simulation before any events occur. If
MDiG is somehow not doing this, then I'd consider it a bug...

Also, since some of your lifestages seem to not do anything (they just
have a single event with 100% survival), is this because MDiG
complains if there is a lifestage with no events? I should fix that...

BTW, if you find stuff that you think is broken, you can add bugs here:

https://bugs.launchpad.net/mdig/

That way I can keep track of what needs fixing ;-)

Joel Pitt, PhD | http://ferrouswheel.me
OpenCog Developer | http://opencog.org
Board member, Humanity+ | http://humanityplus.org
+64 21 101 7308

> --
> To unsubscribe, reply using "remove me" as the subject.
>

Reply all
Reply to author
Forward
0 new messages