-
Notifications
You must be signed in to change notification settings - Fork 30
ScenarioXML
Lars Kamber edited this page Mar 5, 2020
·
8 revisions
We recommend the following approaches:
- Windows — indicates convenient text editors, and archive tools
- For MacOSX — handles archives fine but not necessarily XML files; dashcode (presumably part of xcode) can edit XML files but struggles with scripts. There are a number of other MacOSX editors search for one
- Linux — Kate, vim, emacs, gedit, eclipse (or many more)
Scenarios are written in XML. There is a (long and confusing) standard describing XML here, and a (much more accessible) tutorial here. The basic information is:
- The following things enclosed by angle brackets are called elements. Each one must be closed, either with the short form
<.../>
or the long form<x>...</x>
.
<a/>
<aLongElementName/>
<b></b>
<c>
<d>
<e/>
</d>
</c>
- Elements may have attributes. Each attribute has a name (before the
=
sign) and a value (within the double quotes).
<x a="1" b="2" c="3"/>
<y anAttribute="a value">
<z anotherAttribute="..."/>
</y>
- You can add comments or "comment out" code with the following notation:
<!-- This is a comment. -->
<!-- Element 'a' is used by the program, 'b' is not. -->
<a/>
<!-- <b/> -->
- All scenarios start and end with code like one of the following chunks (pick the appropriate version). Versions 31 and earlier require
analysisNo
andwuID
attributes (in version 32 these are used only for fitting runs and BOINC). Versions 23 and earlier also require anassimMode
attribute. Thename
attribute can be set to whatever you want.
<!-- versions 32 or later (replace the number 32 below) -->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<om:scenario xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="example" schemaVersion="32"
xsi:schemaLocation="http://openmalaria.org/schema/scenario_32 scenario_32.xsd"
xmlns:om="http://openmalaria.org/schema/scenario_32">
...
</om:scenario>
<!-- versions 24 to 31 (replace the number 31 below) -->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<scenario xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" analysisNo="0"
name="template scenario" schemaVersion="31" wuID="0"
xsi:noNamespaceSchemaLocation="scenario_31.xsd">
...
</scenario>
The file name (
scenario_xx.xsd
) can be changed to the name of the schema file, if this is different, but the URL (http://.../scenario_32
) and theschemaVersion="32"
attribute shouldn't be changed, except to replace the number with the appropriate version.
| Download openmalaria | Installation instructions | XML Schema Documentation |
XML Schema Version | Program version | master |
develop |
---|---|---|---|
43 | schema-43.0 |
- User Guide
- Compilation Guide
- Developer Guide
- Schema Update Guide
- Scenario Design Guide
- Monitoring Guide
- Changelog
- Schema Documentation
- Human demography
- Levels of transmission
- Parasite dynamics within humans
- P vivax dynamics
- Vector bionomics and transmission to humans
- Mosquito population dynamics
- Clinical (illness) models
- Time in the models