Created
January 31, 2012 10:52
-
-
Save shawnchin/1709877 to your computer and use it in GitHub Desktop.
Mockup of XMMLv3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flame_model version="3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation='http://flame.ac.uk/schema/xmml_v3.xsd'> | |
<model_name>Circles</model_name> | |
<model_version>02</model_version> | |
<model_description>...</model_description> | |
<environment> | |
<variable type="double" name="width" /> | |
<variable type="double" name="height" /> | |
<variable type="int" name="agent_count" /> | |
</environment> | |
<agent name="circle"> | |
<description>....</description> | |
<memory> | |
<variable type="int" name="id" description="unique agent id" /> | |
<variable type="double" name="x" /> | |
<variable type="double" name="y" /> | |
<variable type="double" name="fx" /> | |
<variable type="double" name="fy" /> | |
<variable type="double" name="radius" description="radius of agent" /> | |
</memory> | |
<state_graph> | |
<state name="START" /> | |
<state name="location_posted" /> | |
<state name="force_calculated" /> | |
<state name="moved" /> | |
<state name="END" /> | |
<transition from="START" to="location_posted"> | |
<function>post_location</function> | |
</transition> | |
<transition from="location_posted" to="force_calculated"> | |
<!-- use "type" attribute to target different EXE queues? --> | |
<function type="cuda">calculate_forces</function> | |
</transition> | |
<transition from="force_calculated" to="moved"> | |
<function>do_move</function> | |
</transition> | |
</state_graph> | |
<functions> | |
<function name="post_location"> | |
<memory access="ro">x</memory> | |
<memory access="ro">y</memory> | |
<output type="message">location</output> | |
</function> | |
<function name="calculate_forces"> | |
<description>....</description> | |
<memory access="ro">x</memory> | |
<memory access="ro">y</memory> | |
<memory access="wo">fx</memory> | |
<memory access="wo">fy</memory> | |
<!-- use the "type" attribute to target custom message | |
implementations? Here "message" is the default and | |
can be omitted --> | |
<input type="message">location</output> | |
</function> | |
<function name="do_move"> | |
<memory access="rw">x</memory> | |
<memory access="rw">y</memory> | |
<memory access="ro">fx</memory> | |
<memory access="ro">fy</memory> | |
</function> | |
</functions> | |
</agent> | |
<message name="location"> | |
<description>...</description> | |
<variable type="int" name="id" /> | |
<variable type="double" name="x" /> | |
<variable type="double" name="y" /> | |
</message> | |
</flame_model> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment