<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="scenario">
    <xs:annotation>
      <xs:documentation>Description of scenario</xs:documentation>
      <xs:appinfo>units:List of elements;name:Scenario;</xs:appinfo>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="demography" type="demography">
          <xs:annotation>
            <xs:documentation>
              Description of demography
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Human age distribution;</xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="monitoring" type="monitoring">
          <xs:annotation>
            <xs:documentation>
              Description of surveys
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Measures to be reported;</xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="interventions" type="interventions">
          <xs:annotation>
            <xs:documentation>
              List of interventions. Generally these are either point-time
              distributions of something to some subset of the population, or
              continuous-time distribution targetting individuals when they
              reach a certain age.
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Preventative interventions;</xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="healthSystem" type="healthSystem">
          <xs:annotation>
            <xs:documentation>
              Description of health system.
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Health system description;</xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="entoData" type="entoData">
          <xs:annotation>
            <xs:documentation>
              Description of entomological data
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Transmission and vector bionomics;</xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="drugDescription" type="drugDescription" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Drug model parameters
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Pharmacokinetics and pharmacodynamics;</xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="model">
          <xs:annotation>
            <xs:documentation>
            Encapsulation of all parameters which describe the model according
            to which fitting is done.
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Model options and parameters;</xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ModelOptions" type="OptionSet">
                <xs:annotation>
                  <xs:documentation>
                    All model options (bug fixes, choices between models, etc.).                    
                    The list of recognised options can be found in the code at:
                    include/util/ModelOptions.h and should also be in the wiki.
                  </xs:documentation>
                  <xs:appinfo>units:List of elements;name:Model Options;</xs:appinfo>
                </xs:annotation>
              </xs:element>
              <xs:element name="clinical" type="clinical" />
              <xs:element name="human" type="human"/>
              <xs:element name="parameters" type="parameters">
                <xs:annotation>
                  <xs:documentation>
                    Parameters of the epidemiological model
                  </xs:documentation>
                  <xs:appinfo>units:List of elements;name:Parameters of the model of epidemiology;</xs:appinfo>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="schemaVersion" type="xs:int" use="required">
        <xs:annotation>
          <xs:documentation>
            Version of xml schema. If not equal to the current version
            an error is thrown. Use SchemaTranslator to update xml files.
          </xs:documentation>
          <xs:appinfo>name:Version of the xml schema;exposed:false;</xs:appinfo>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="analysisNo" type="xs:int" use="required">
        <xs:annotation>
          <xs:documentation>
            Unique identifier of scenario
          </xs:documentation>
          <xs:appinfo>units:Number;min:1;max:100000000;name:Reference number of the analysis;exposed:false;
          </xs:appinfo>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            Name of intervention
          </xs:documentation>
          <xs:appinfo>units:string;name:Name of intervention;</xs:appinfo>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="wuID" type="xs:int" use="required">
        <xs:annotation>
          <xs:documentation>
            Work unit ID. Only used to validate
            checkpointing, to prevent checkpoint cheats.
          </xs:documentation>
          <xs:appinfo>
            units:Number;min:1;max:100000000;name:Work unit identifier;exposed:false;
          </xs:appinfo>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <!--Parameters-->
  <xs:complexType name="parameter">
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>Name of parameter</xs:documentation>
        <xs:appinfo>units:string;name:Name of parameter;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="number" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>
          Reference number of input parameter
        </xs:documentation>
        <xs:appinfo>units:Number;min:1;max:100;name:Parameter number;exposed:false;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="value" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>Parameter value</xs:documentation>
        <xs:appinfo>units:Number;min:0;name:Parameter value;sweepable:true;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="include" type="xs:boolean">
      <xs:annotation>
        <xs:documentation>
          True if parameter is to be sampled in optimization
          runs. Not used in simulator app.
        </xs:documentation>
        <xs:appinfo>units:Number;min:0;max:1;name:Sampling indicator;exposed:false;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="OptionSet">
    <xs:sequence>
      <xs:element name="option" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="name" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>
            Options define different model structures.
		Option name. Must be one of a strictly defined set.
		Options are not required to be listed if their default value is desired.
	      </xs:documentation>
              <xs:appinfo>name:Model options required;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="value" type="xs:boolean" default="true">
            <xs:annotation>
              <xs:documentation>
		Option value (true/false). Each option has a default value used
		if the option is not listed (usually false but sometimes true).
	      </xs:documentation>
            <xs:appinfo>name:Indicator of whether option is required;</xs:appinfo>
           </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="parameters">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="parameter" type="parameter" />
    </xs:sequence>
    <xs:attribute name="interval" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>Simulation step</xs:documentation>
        <xs:appinfo>units:Days;name:Simulation step;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="iseed" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>Seed for RNG</xs:documentation>
        <xs:appinfo>units:Number;name:Random number seed;sweepable:true;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="latentp" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>
          pre-erythrocytic latent period, in time steps
        </xs:documentation>
        <xs:appinfo>units:Time steps;min:0;max:20;name:Pre-erythrocytic latent period;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="inputValue">
    <xs:attribute name="value" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>A double-precision floating-point value.</xs:documentation>
        <xs:appinfo>name:Input parameter value;exposed:false;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!---HumanPopulationStructure-->
  <xs:complexType name="demography">
    <xs:sequence>
      <xs:element name="ageGroup" type="ageGroupPerC">
        <xs:annotation>
          <xs:documentation>
            List of age groups included in demography
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Age groups;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name of demography data
        </xs:documentation>
        <xs:appinfo>units:string;name:Name of demography data;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="popSize" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>Population size</xs:documentation>
        <xs:appinfo>units:Count;min:1;max:100000;name:Population size;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="maximumAgeYrs" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Maximum age of simulated humans in years.
        </xs:documentation>
        <xs:appinfo>units:years;min:0;max:100;name:Maximum age of simulated humans;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="growthRate" type="xs:double" use="optional">
      <xs:annotation>
        <xs:documentation>
          Growth rate of human population.
	    (we should be able to implement this with non-zero values)
        </xs:documentation>
        <xs:appinfo>units:Number;min:0;max:0;name:Growth rate of human population;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!--Entomology-->
  <xs:complexType name="EIRDaily">
    <xs:annotation>
      <xs:documentation>
      In the non-vector model, EIR is input as a sequence of daily values.
      There must be at least a years' worth of entries (365), and if there
      are more, values are wrapped and averaged (i.e. value for first day
      of year is taken as the mean of values for days 0, 365+0, 2*365+0,
      etc.).
      </xs:documentation>
      <xs:appinfo>units:Infectious bites per adult per day;name:Daily Entomological Inoculation Rate;exposed:false;</xs:appinfo>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:double">
        <xs:attribute name="origin" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>
            </xs:documentation>
            <xs:appinfo>name:Time origin of EIR sequence;exposed:false;</xs:appinfo>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="anopheles">
    <xs:annotation>
      <xs:documentation>Description of input EIR for
       one specific vector species in terms of a Fourier approximation
       to the ln of the EIR during the burn in period</xs:documentation>
      <xs:appinfo>name:Description of input EIR for one vector;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:choice>
        <xs:element name="eir">
          <xs:annotation>
            <xs:documentation>
              Description of target entomological inoculation rate as a
              Fourier series. This is used to estimate a suitible vector
              emergence rate. The annual (target) EIR is thus the exponent
              of the fourier series with these parameters, with period
              scaled to 365 days.
            </xs:documentation>
            <xs:appinfo>units:Infectious bites per adult per day;name:Fourier approximation to pre-intervention EIR;</xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="a0" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>
                  a0 parameter of Fourier approximation to ln(EIR)
                </xs:documentation>
                <xs:appinfo>name:a0 parameter of Fourier approximation to ln(EIR);sweepable:true;</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="a1" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>
                  a1 parameter of Fourier approximation to ln(EIR)
                </xs:documentation>
                <xs:appinfo>name:a1 parameter of Fourier approximation to ln(EIR);</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="b1" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>
                  b1 parameter of Fourier approximation to ln(EIR)
                </xs:documentation>
                <xs:appinfo>name:b1 parameter of Fourier approximation to ln(EIR);</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="a2" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>
                  a2 parameter of Fourier approximation to ln(EIR)
                </xs:documentation>
                <xs:appinfo>name:a2 parameter of Fourier approximation to ln(EIR);</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="b2" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>
                  b2 parameter of Fourier approximation to ln(EIR)
                </xs:documentation>
                <xs:appinfo>name:b2 parameter of Fourier approximation to ln(EIR);</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="EIRRotateAngle" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>
                  Rotation angle defining the origin of the Fourier approximation to ln (EIR)
                </xs:documentation>
                <xs:appinfo>units:radians;name:Rotation angle defining the origin of the Fourier approximation to ln (EIR);</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="monthlyEir">
          <xs:annotation>
            <xs:documentation>
              Description of target entomological inoculation rate as monthly
              values plus an annual override (monthly values are scaled to fit
              the annual EIR described). This is used to estimate a suitible vector
              emergence rate. The annual (target) EIR is derived from a Fourier
              series fit to these monthly values (used as a smoothing factor).
              List should contain twelve entries: January to December.
            </xs:documentation>
            <xs:appinfo>units:Infectious bites per adult per month;name:Monthly values for pre-intervention EIR;</xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="item" minOccurs="12" maxOccurs="12" type="xs:double">
                <xs:annotation>
                  <xs:documentation>
                    Inoculations per person per month
                  </xs:documentation>
                  <xs:appinfo>units:Inoculations per person per month;name:Monthly pre-intervention EIR;</xs:appinfo>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="annualEIR" type="xs:double" use="required">
              <xs:annotation>
                <xs:documentation>Scales the monthly values to give this annual innoculation rate.</xs:documentation>
                <xs:appinfo>units:Infectious bites per adult per year;name:Annual EIR;min:0;</xs:appinfo>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:element name="mosq">
        <xs:annotation>
          <xs:documentation>Vector species</xs:documentation>
          <xs:appinfo>units:List of elements;name:Vector Species;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="mosqRestDuration" type="xs:int" use="required">
            <xs:annotation>
              <xs:documentation>name:Duration of the resting period of the vector (days);</xs:documentation>
              <xs:appinfo>name:Duration of the resting period of the vector (days);</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="extrinsicIncubationPeriod" type="xs:int" use="required">
            <xs:annotation>
              <xs:documentation>name:Extrinsic incubation period (days)</xs:documentation>
              <xs:appinfo>name:Extrinsic incubation period (days);</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqLaidEggsSameDayProportion" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Proportion of mosquitoes host seeking on same day as ovipositing</xs:documentation>
              <xs:appinfo>name:Proportion of mosquitoes host seeking on same day as ovipositing;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqSeekingDuration" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Duration of the host-seeking period of the vector (days)</xs:documentation>
              <xs:appinfo>name:Duration of the host-seeking period of the vector (days);</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqSurvivalFeedingCycleProbability" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability that the mosquito survives the feeding cycle</xs:documentation>
              <xs:appinfo>name:Probability that the mosquito survives the feeding cycle;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbBiting" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability that the mosquito succesfully bites chosen host</xs:documentation>
              <xs:appinfo>name:Probability that the mosquito succesfully bites chosen host;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbFindRestSite" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability that the mosquito escapes host and finds a resting place after biting</xs:documentation>
              <xs:appinfo>name:Probability that the mosquito escapes host and finds a resting place after biting;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbResting" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability of mosquito successfully resting after finding a resting site</xs:documentation>
              <xs:appinfo>name:Probability of mosquito successfully resting after finding a resting site;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbOvipositing" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability of a mosquito successfully laying eggs given that it has rested</xs:documentation>
              <xs:appinfo>name:Probability of a mosquito successfully laying eggs given that it has rested;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqHumanBloodIndex" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>The proportion of resting mosquitoes which fed on human blood during the last feed.</xs:documentation>
              <xs:appinfo>name:Human blood index;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="minInfectedThreshold" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>If less than this many mosquitoes remain infected, transmission is interrupted.</xs:documentation>
              <xs:appinfo>name:Min infected threshold;min:0;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="nonHumanHosts" maxOccurs="unbounded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Non human host parameters, per type of host (must match up with non-species-specific parameters).</xs:documentation>
          <xs:appinfo>units:List of elements;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="name" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>Identifier for this category of non-human hosts</xs:documentation>
              <xs:appinfo>name:Identifier for this category of non-human hosts;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqRelativeEntoAvailability" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Relative availability of nonhuman hosts of type i (to other nonhuman hosts)</xs:documentation>
              <xs:appinfo>name:Relative availability of nonhuman hosts of type i (to other nonhuman hosts);</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbBiting" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability of mosquito successfully biting host</xs:documentation>
              <xs:appinfo>name:Probability of mosquito successfully biting host;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbFindRestSite" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability that the mosquito escapes host and finds a resting place after biting</xs:documentation>
              <xs:appinfo>name:Probability that the mosquito escapes host and finds a resting place after biting;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mosqProbResting" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>Probability of mosquito successfully resting after finding a resting site</xs:documentation>
              <xs:appinfo>name:Probability of mosquito successfully resting after finding a resting site;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="mosquito" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>Identifier for this anopheles species</xs:documentation>
        <xs:appinfo>name:Identifier for this anopheles species;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="propInfected" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>Initial guess of the proportion of mosquitoes which are infected, o: O_v(t) = o*N_v(t). Only used as a starting value.</xs:documentation>
        <xs:appinfo>units:Proportion;min:0;max:1;name:Initial guess of proportion of mosquitoes infected;exposed:false;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="propInfectious" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>Initial guess of the proportion of mosquitoes which are infectious, s: S_v(t) = s*N_v(t). Used as a starting value and then fit.</xs:documentation>
        <xs:appinfo>units:Proportion;min:0;max:1;name:Initial guess of proportion of mosquitoes infectious;exposed:false;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="entoData">
    <xs:sequence>
      <xs:choice>
        <xs:element name="nonVector" type="nonVector">
          <xs:annotation>
	    <xs:documentation>
              Description of transmission setting for models without vector control interventions
              (included for backward compatibility)
	    </xs:documentation>
	    <xs:appinfo>units:List of elements;name:Transmission setting (vector control not enabled);</xs:appinfo>
	  </xs:annotation>
	</xs:element>
        <xs:element name="vector">
          <xs:annotation>
            <xs:documentation>Parameters of the transmission model.</xs:documentation>
            <xs:appinfo>units:List of elements;name:Transmission setting (vector control enabled);</xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" minOccurs="1" name="anopheles" type="anopheles" />
              <xs:element maxOccurs="unbounded" minOccurs="0" name="nonHumanHosts">
                <xs:complexType>
                  <xs:attribute name="name" type="xs:string" use="required">
                    <xs:annotation>
                      <xs:documentation>Name of this species of non human hosts (must match up with those described per anopheles section) </xs:documentation>
                      <xs:appinfo>units:List of elements;name:Species of alternative host;</xs:appinfo>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="number" type="xs:double" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name of entomology data
        </xs:documentation>
        <xs:appinfo>units:string;name:Entomology dataset;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="mode" use="required">
      <xs:annotation>
        <xs:documentation>
        Transmission simulation mode -- enter dynamic mode (4) or forced mode
        (2) at start of intervention period. Mode 3 (transient EIR from data
        provided as intervention) is set when intervention data is applied, and
        is no longer a valid value to specify here.
        </xs:documentation>
        <xs:appinfo>units:Code;name:Transmission simulation mode;</xs:appinfo>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:int">
          <xs:enumeration value="2" />
          <xs:enumeration value="4" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="annualEIR" type="xs:double" use="optional">
      <xs:annotation>
        <xs:documentation>
          If set, overrides the annual EIR by scaling it to this level.
          If ommitted, EIR levels are as specified elsewhere.
        </xs:documentation>
        <xs:appinfo>units:Infectious bites per adult per year;name:Override annual EIR;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="nonVector">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="unbounded" name="EIRDaily" type="EIRDaily"/>
    </xs:sequence>
    <xs:attribute name="eipDuration" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>The duration of sporogony in days</xs:documentation>
        <xs:appinfo>name:Duration of sporogony (days);</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!--Monitoring-->
  <xs:complexType name="monitoring">
    <xs:sequence>
      <xs:element name="continuous" minOccurs="0">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="OptionSet">
              <xs:attribute name="period" type="xs:int" use="required">
                <xs:annotation>
                  <xs:documentation>
                    Number of timesteps between reports.
                  </xs:documentation>
                  <xs:appinfo>
                    units:Days;min:1;max:unbounded;name:Days between reports;
                  </xs:appinfo>
                </xs:annotation>
              </xs:attribute>
              <xs:attribute name="duringInit" type="xs:boolean" use="optional">
                <xs:annotation>
                  <xs:documentation>
                    Also output during initialization. By default this is
                    disabled (only intervention-period data is output). This
                    should not be used for predictions, but can be useful for
                    model validation.
                    
                    In this mode, 'simulation time' is output as the first
                    column (in addition to 'timestep'), since 'timestep' is dis-
                    continuous across the start of the intervention period.
                  </xs:documentation>
                  <xs:appinfo>
                    units:Days;min:1;max:unbounded;name:During initialization;
                  </xs:appinfo>
                </xs:annotation>
              </xs:attribute>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="SurveyOptions" type="OptionSet">
        <xs:annotation>
          <xs:documentation>
	    List of all active survey options. See include/Survey.h for a list of
	    supported outputs. Should also be on the wiki.
	  </xs:documentation>
          <xs:appinfo>name:Name of quantity;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="surveys">
        <xs:annotation>
          <xs:documentation>
            List of survey times
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Survey times (time steps);</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="surveyTime" type="xs:int" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>
                  Survey time; 0 means just before start of main sim and is a valid survey-point.
                  Reported data is either from a point-time survey (immediate data) or is collected over the previous year (data from previous timesteps-per-year period).
                  Simulation will end immediately after last survey is taken.
                </xs:documentation>
                <xs:appinfo>units:Number;min:0;name:Survey time;</xs:appinfo>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="detectionLimit" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>
                Detection limit for parasitemia
              </xs:documentation>
              <xs:appinfo>
                units:parasites/micolitre;min:0;max:1000;name:Detection limit for parasitaemia;
              </xs:appinfo>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="ageGroup" type="ageGroup">
        <xs:annotation>
          <xs:documentation>
            List of age groups included in demography or surveys
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Age groups;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name of monitoring data
        </xs:documentation>
        <xs:appinfo>units:string;name:Name of monitoring information;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="cohortOnly" type="xs:boolean" use="optional">
      <xs:annotation>
        <xs:documentation>
          If true, for many output measures, the output comes only from individuals
          in the cohort; otherwise output is from the entire population.
          
          Does not need to be specified if no cohort-selecting "interventions"
          are present.
        </xs:documentation>
        <xs:appinfo>name:Survey only cohort;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="firstBoutOnly" type="xs:boolean" use="optional">
      <xs:annotation>
        <xs:documentation>
          If true, remove individuals from the cohort at the start of the first episode
          (start of a clinical bout) since they were recruited into the cohort.
          This is intended for cohort studies that intend to measure time to
          first episode, using active case detection.
        </xs:documentation>
        <xs:appinfo>name:Time to first episode only;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="firstTreatmentOnly" type="xs:boolean" use="optional">
      <xs:annotation>
        <xs:documentation>
          If true, remove individuals from the cohort when they first seek
          treatment since they were recruited into the cohort. This is intended
          for cohort studies that intend to measure time to first episode,
          using passive case detection.
        </xs:documentation>
        <xs:appinfo>name:Time to first treatment only;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="firstInfectionOnly" type="xs:boolean" use="optional">
      <xs:annotation>
        <xs:documentation>
          If true, remove individuals from the cohort at completion of the first
          survey in which they present with a patent infection since they were
          recruited into the cohort. This intended for cohort studies that
          intend to measure time to first infection, using active case detection.
        </xs:documentation>
        <xs:appinfo>name:Time to first infection only;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!-- ageGroup -->
  <xs:complexType name="ageGroup">
    <xs:annotation>
      <xs:documentation>
        List of age groups included in surveys
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:list of age groups;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="group" type="groupBounds" />
    </xs:sequence>
    <xs:attribute name="lowerbound" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Lower bound of age group
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:lower bound of age group</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="groupBounds">
    <xs:attribute name="upperbound" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Upper bound of age group
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:upper bound of age group</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!-- ageGroup -->
  <xs:complexType name="ageGroupPerC">
    <xs:annotation>
      <xs:documentation>
        List of age groups included in demography or surveys
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:list of age groups;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="group" type="groupBoundsPerC" />
    </xs:sequence>
    <xs:attribute name="lowerbound" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Lower bound of age group
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:lower bound of age group</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="groupBoundsPerC">
    <xs:attribute name="poppercent" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Percentage of human population in age group
        </xs:documentation>
        <xs:appinfo>name:Percentage in age group</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="upperbound" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Upper bound of age group
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:upper bound of age group</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!--Interventions-->
  <xs:complexType name="interventions">
    <xs:sequence>
      <xs:element name="descriptions">
        <xs:annotation>
          <xs:documentation>Descriptions applying across all uses of an intervention.</xs:documentation>
          <xs:appinfo>name:descriptions;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="MDADescription" type="HSESCaseManagement">
              <xs:annotation>
                <xs:documentation>
                  Description of treatment type used by mass treatment option
                  of one-day case management model. Can be used to describe
                  one-size-fits-all mass drug dosing, age-based mass drug dosing
                  and screen-and-treat. Number of treatments given can be
                  reported by the nMDAs option.
                </xs:documentation>
                <xs:appinfo>name:Description of MDA;</xs:appinfo>
              </xs:annotation>
            </xs:element>
            <xs:element maxOccurs="3" minOccurs="0" name="vaccineDescription" type="vaccineDescription" />
            <xs:element maxOccurs="1" minOccurs="0" name="iptiDescription" type="iptDescription" />
            <xs:element minOccurs="0" name="ITNDecay" type="DecayFunction"/>
            <xs:element minOccurs="0" name="IRSDecay" type="DecayFunction"/>
            <xs:element minOccurs="0" name="VADecay" type="DecayFunction"/>
            <xs:element name="anopheles" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="ITNDescription" type="ITNDescription" />
                  <xs:element minOccurs="0" name="IRSDescription" type="IRSDescription" />
                  <xs:element minOccurs="0" name="VADescription" type="BaseInterventionDescription" />
                </xs:sequence>
                <xs:attribute name="mosquito" type="xs:string" use="required">
                  <xs:annotation>
                    <xs:documentation>
                  Description of the entomological effects of interventions
                  </xs:documentation>
                    <xs:appinfo>name:Entomological effects of interventions</xs:appinfo>
                  </xs:annotation>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="continuous" type="continuous">
        <xs:annotation>
          <xs:documentation>Continuously applied interventions</xs:documentation>
          <xs:appinfo>name:Continuously applied interventions;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="timed" type="timed">
        <xs:annotation>
          <xs:documentation>List of timed interventions</xs:documentation>
          <xs:appinfo>units:List of elements;name:Timed interventions;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>Name of age specific intervention</xs:documentation>
        <xs:appinfo>units:string;name:Intervention;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="continuous">
    <xs:annotation>
      <xs:documentation>Interventions to be deployed continuously</xs:documentation>
      <xs:appinfo>name:Interventions to be deployed continuously;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="vaccine" type="ageSpecific">
        <xs:annotation>
          <xs:documentation>List of age groups for vaccination</xs:documentation>
          <xs:appinfo>units:List of elements;name:List of age groups for vaccination;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="ITN" type="ageSpecific">
        <xs:annotation>
          <xs:documentation>Description of ITN deployment in the community</xs:documentation>
          <xs:appinfo>units:List of elements;name:Description of ITN deployment;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="ipti" type="ageSpecific">
        <xs:annotation>
          <xs:documentation>
            List of age groups for IPTi distribution
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:List of age groups for IPTi</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="cohort" type="ageSpecific">
        <xs:annotation>
          <xs:documentation>
            Description of continuous selection of individuals for a cohort study.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Continuous cohort selection;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="timed">
    <xs:annotation>
      <xs:documentation>
        List of timed interventions
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:List of timed interventions;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="intervention" type="intervention" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="mass">
    <xs:attribute name="maxAge" type="xs:double" default="100">
      <xs:annotation>
        <xs:documentation>
          Maximum age of eligible individuals (defaults to 100)
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:Maximum age of eligible individuals;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="minAge" type="xs:double" default="0">
      <xs:annotation>
        <xs:documentation>
          Minimum age of eligible individuals (defaults to 0)
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:Minimum age of eligible individuals;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="coverage" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Coverage of intervention
        </xs:documentation>
        <xs:appinfo>units:Proportion;min:0;max:1;name:Coverage;sweepable:true</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="cohort" type="xs:boolean" default="false">
      <xs:annotation>
        <xs:documentation>
          Restrict distribution to chosen cohort.
        </xs:documentation>
        <xs:appinfo>units:Proportion;min:0;max:1;name:Cohort only;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="massCum">
    <xs:complexContent>
      <xs:extension base="mass">
        <xs:attribute name="cumulativeWithMaxAge" type="xs:double" use="optional">
          <xs:annotation>
            <xs:documentation>
              If present, activate cumulate deployment mode where intervention
              is only deployed to individuals not already considered protected
              in sufficient quantity to bring the total proportion of people
              covered up to level described by "coverage".
              
              Individuals are considered already protected by this intervention
              when the age of the last net/dose/etc. received is less than
              "maximum age" (this attribute) years old (i.e. when
              timeLastDeployment+maximumAge>currentTimeStep).
            </xs:documentation>
            <xs:appinfo>units:Years;name:Cumulative deployment: maximum age;min:0</xs:appinfo>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ageSpecific">
    <xs:attribute name="targetAgeYrs" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Target age of intervention
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;max:100;name:Target age;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="coverage" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Coverage of intervention
        </xs:documentation>
        <xs:appinfo>units:Proportion;min:0;max:1;name:Proportion covered;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="cohort" type="xs:boolean" default="false">
      <xs:annotation>
        <xs:documentation>
          Restrict distribution to chosen cohort (default: false).
        </xs:documentation>
        <xs:appinfo>units:Proportion;min:0;max:1;name:Cohort only;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="begin" type="xs:int" default="0">
      <xs:annotation>
        <xs:documentation>
          First timestep (from 0 at the beginning of the intervention period)
          this item is active. Defaults to 0.
        </xs:documentation>
        <xs:appinfo>units:Timesteps;min:0;max:2147483647;name:First timestep active;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="end" type="xs:int" default="2147483647">
      <xs:annotation>
        <xs:documentation>
          End of the period during which the intervention is active (to be
          exact, the first timestep of the intervention period at which the item
          becomes inactive). Defaults to 2147483647.
        </xs:documentation>
        <xs:appinfo>units:Timesteps;min:0;max:2147483647;name:End timestep;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="intervention">
    <xs:sequence>
      <xs:element minOccurs="0" name="changeHS" type="healthSystem"/>
      <xs:element minOccurs="0" name="changeEIR" type="nonVector">
          <xs:annotation>
            <xs:documentation>
              New description of transmission setting for models without vector control interventions
              (included for backward compatibility)
            </xs:documentation>
            <xs:appinfo>units:List of elements;name:Replacement transmission setting (vector control not enabled);</xs:appinfo>
          </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="importedInfectionsPerThousandHosts" type="xs:double">
      <xs:annotation>
          <xs:documentation>
          Import infections (as if a mosquito bites a human). Imported via a
          Bernoulli trial per host.
          </xs:documentation>
          <xs:appinfo>name:Import infections;units:Number per 1000 hosts;min:0</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="MDA" type="mass">
        <xs:annotation>
          <xs:documentation>
            Description of mass drug deployment in the community.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Mass Drug Administration;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="vaccinate" type="massCum">
        <xs:annotation>
          <xs:documentation>
            Description of vaccine deployment in the
            community
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Vaccination;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ITN" type="massCum">
        <xs:annotation>
          <xs:documentation>
            Description of ITN deployment in the community
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:ITN deployment;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="IRS" type="massCum">
        <xs:annotation>
          <xs:documentation>
            Description of IRS deployment in the community
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:IRS deployment;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="VectorAvailability" type="massCum">
        <xs:annotation>
          <xs:documentation>
            Description of a mosquito deterrent deployment in the community
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Mosquito deterrent;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ipti" type="massCum">
        <xs:annotation>
          <xs:documentation>
            List of age groups for IPTi distribution
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:IPTi deployment;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="immuneSuppression" type="mass">
        <xs:annotation>
          <xs:documentation>
            Removes all exposure-related immunity gained over time by hosts
            without removing infections.
            
            Hypothetical, but potentially useful to simulate scenarios with
            unprotected humans.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Immune suppression deployment;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="insertR_0Case">
        <xs:annotation>
          <xs:documentation>
            Used to simulate R_0. First, infections should be eliminated,
            immunity removed, and the population given an effective transmission-
            blocking vaccine (not done by this intervention). Then this
            intervention may be used to: pick one human, infect him, administer
            a fully effective Preerythrocytic vaccine and remove
            transmission-blocking vaccine effect on this human. Thus only this
            one human will be a source of infections in an unprotected population,
            and will not reinfected himself.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Insert R_0 case;</xs:appinfo>
        </xs:annotation>
        <xs:complexType/>
      </xs:element>
      <xs:element minOccurs="0" name="uninfectVectors">
        <xs:annotation>
          <xs:documentation>
            Removes all infections from mosquitoes -- resulting in zero EIR to
            humans, until such time that mosquitoes are re-infected and become
            infectious. Only effectious in dynamic EIR mode (when changeEIR was
            not used).
            
            Hypothetical, but potentially useful to simulate a setting starting
            from no infections, but with enough mosquitoes to reach a set
            equilibrium of exposure.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Uninfect vectors;</xs:appinfo>
        </xs:annotation>
        <xs:complexType/>
      </xs:element>
      <xs:element minOccurs="0" name="larviciding">
        <xs:annotation>
          <xs:documentation>
            Simple larviciding intervention description.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Simple larviciding intervention;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="anopheles" type="larvicidingAnopheles" maxOccurs="unbounded" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="cohort" type="massCum">
        <xs:annotation>
          <xs:documentation>
            Description of mass cohort selection.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Mass Cohort Selection;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="time" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>
          Time step of intervention
        </xs:documentation>
        <xs:appinfo>units:Number;min:1;max:10000;name:Time step of intervention;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="larvicidingAnopheles">
    <xs:attribute name="mosquito" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Mosquito to be larvicided
        </xs:documentation>
        <xs:appinfo>name:Mosquito to be larvicided;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="effectiveness" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
	  Proportional reduction in emergence rate
	</xs:documentation>
        <xs:appinfo>units:none;min:0;max:1;name:Proportionate reduction in emergence;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="duration" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>
	  Number of days for which the intervention is active.
	</xs:documentation>
        <xs:appinfo>units:days;min:0;max:inf;name:Duration of activity;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="vaccineDescription">
    <xs:sequence>
      <xs:element name="decay" type="DecayFunction">
        <xs:annotation>
          <xs:documentation>
            Specification of decay of efficacy
          </xs:documentation>
          <xs:appinfo>name:Decay of effect;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="efficacyB" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Measure of variation in vaccine efficacy
          </xs:documentation>
          <xs:appinfo>units:Positive real;min:0.001;max:1.00E+06;name:Variance parameter for vaccine efficacy;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="1" name="initialEfficacy" type="inputValue" />
    </xs:sequence>
    <xs:attribute name="vaccineType" use="required">
      <xs:annotation>
        <xs:documentation>Type of vaccine</xs:documentation>
        <xs:appinfo>units:Code;name:Type of vaccine;</xs:appinfo>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="PEV" />
          <xs:enumeration value="BSV" />
          <xs:enumeration value="TBV" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="iptDescription">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="infGenotype">
        <xs:complexType>
          <xs:attribute name="name" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>
                Name of age specific intervention
              </xs:documentation>
              <xs:appinfo>units:string;name:Age specific intervention;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="freq" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>
                Frequency of parasite genotype
              </xs:documentation>
              <xs:appinfo>name:Frequency;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="ACR" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>
                Adequate clinical response (proportion)
              </xs:documentation>
              <xs:appinfo>name:ACR;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="proph" type="xs:int" use="required">
            <xs:annotation>
              <xs:documentation>
                Prophylactic period
              </xs:documentation>
              <xs:appinfo>name:Prophylactic period;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="tolPeriod" type="xs:int" use="required">
            <xs:annotation>
              <xs:documentation>
                Tolerance period
              </xs:documentation>
              <xs:appinfo>name:Tolerance period;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="atten" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>
                Tolerance period
              </xs:documentation>
              <xs:appinfo>name:Tolerance period;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="iptiEffect" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>Description of ipti effect</xs:documentation>
        <xs:appinfo>units:List of Elementes;name:Description of ipti effect;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="ITNDescription">
    <xs:complexContent>
      <xs:extension base="BaseInterventionDescription">
        <xs:sequence>
          <xs:element name="preprandialKillingEffect" type="inputValue">
            <xs:annotation>
              <xs:documentation>
              One minus this multiplies the survival rate of mosquitoes attempting to bite a host.
            </xs:documentation>
              <xs:appinfo>units:None;min:0;max:1;name:Pre-prandial killing effect</xs:appinfo>
            </xs:annotation>
          </xs:element>
          <xs:element name="postprandialKillingEffect" type="inputValue">
            <xs:annotation>
              <xs:documentation>
              One minus this multiplies the survival rate of mosquitoes attempting to escape after biting a host.
            </xs:documentation>
              <xs:appinfo>units:None;min:0;max:1;name:Post-prandial killing effect</xs:appinfo>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="IRSDescription">
    <xs:complexContent>
      <xs:extension base="BaseInterventionDescription">
        <xs:sequence>
          <xs:element name="killingEffect" type="inputValue">
            <xs:annotation>
              <xs:documentation>
              One minus this multiplies the survival rate of resting mosquitoes.
            </xs:documentation>
              <xs:appinfo>units:None;min:0;max:1;name:killing effect;</xs:appinfo>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BaseInterventionDescription">
    <xs:annotation>
      <xs:documentation>
        Descriptions of initial effectiveness of each of the effects of
        interventions. Decay is specified by a separate element (ITNDecay etc.)
      </xs:documentation>
      <xs:appinfo>units:None;min:0;max:1;name:Deterrency;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="deterrency" type="inputValue">
        <xs:annotation>
          <xs:documentation>
		  One minus this multiplies the host's availability.
		</xs:documentation>
          <xs:appinfo>units:None;min:0;max:1;name:Deterrency;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name of intervention
        </xs:documentation>
        <xs:appinfo>units:string;name:Name of intervention;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!-- HealthSystem & Clinical data -->
  <xs:complexType name="clinical">
    <xs:annotation>
      <xs:documentation>
        Description of clinical parameters.
        
        This is related to the health-system description, but contains data
        which can't be changed as part of an intervention and is not restricted
        to treatment.
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:Description of clinical parameters;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="NonMalariaFevers" minOccurs="0">
        <xs:complexType>
          <xs:annotation>
            <xs:documentation>
              Description of non-malaria fever incidence. Non-malaria fevers
              are only modelled if the NON_MALARIA_FEVERS option is used.
            </xs:documentation>
            <xs:appinfo>name:Non-malaria fevers;</xs:appinfo>
          </xs:annotation>
          <xs:sequence>
            <xs:element name="incidence" type="AgeGroupValues">
              <xs:annotation>
                <xs:documentation>
                  Probability that a non-malaria fever occurs given that no concurrent
                  malaria fever occurs.
                </xs:documentation>
                <xs:appinfo>name:P(NMF);units:none;min:0;max:1;</xs:appinfo>
              </xs:annotation>
            </xs:element>
            <xs:element name="prNeedTreatmentNMF" type="AgeGroupValues">
              <xs:annotation>
                <xs:documentation>
                  Probability that a non-malaria fever needs treatment with
                  antibiotics (assuming fever is not induced by malaria, although
                  concurrent parasites may be present).
                </xs:documentation>
                <xs:appinfo>name:P(need treatment | NMF);units:none;min:0;max:1;</xs:appinfo>
              </xs:annotation>
            </xs:element>
            <xs:element name="prNeedTreatmentMF" type="AgeGroupValues">
              <xs:annotation>
                <xs:documentation>
                  Probability that a malaria fever needs treatment with
                  antibiotics (assuming fever is induced by malaria, although
                  concurrent bacteria may be present).
                  
                  Meaning partially overlaps with separate model for comorbidity
                  given malaria.
                </xs:documentation>
                <xs:appinfo>name:P(need treatment | MF);units:none;min:0;max:1;</xs:appinfo>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="healthSystemMemory" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>
          Follow-up period during which a recurrence is
          considered to be a treatment failure
        </xs:documentation>
        <xs:appinfo>units:Time steps;min:1;max:100;name:Follow-up period during which recurrence is treated as a failure;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="healthSystem">
    <xs:annotation>
      <xs:documentation>
        Description of case management system, used to specify the initial model
        or a replacement (an intervention). Encompasses case management
        data and some other data required to derive case outcomes.
        
        Contains a sub-element describing the particular health-system in use.
        Health system data is here defined as data used to decide on a treatment
        strategy, given a case requiring treatment.
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:Case management system;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:choice>
        <xs:element name="EventScheduler" type="HSEventScheduler" />
        <xs:element name="ImmediateOutcomes" type="HSImmediateOutcomes" />
      </xs:choice>
      <xs:element name="CFR" type="AgeGroupValues">
        <xs:annotation>
          <xs:documentation>
            Case fatality rate (probability of an inpatient fatality from a
            bout of severe malaria, per age-group).
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Case fatality rate in inpatients;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="pSequelaeInpatient" type="AgeGroupValues">
        <xs:annotation>
          <xs:documentation>
            List of age specific probabilities of sequelae in inpatients,
            during a severe bout.
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Probabilities of sequelae in inpatients;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HSImmediateOutcomes">
    <xs:annotation>
      <xs:documentation>
        Description of "immediate outcomes" health system:
        Tediosi et al case management model (Case management as
        described in AJTMH 75 (suppl 2) pp90-103).
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:Case Management (Tediosi et al);</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="drugRegimen">
        <xs:annotation>
          <xs:documentation>
            Description of drug regimen
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Description of drug regimen;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="firstLine" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>
                Code for first line drug
              </xs:documentation>
              <xs:appinfo>units:Drug code;name:First line drug;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="secondLine" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>
                Code for second line drug
              </xs:documentation>
              <xs:appinfo>units:Drug code;name:Second line drug;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="inpatient" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>
                Code for drug used for treating
                inpatients
              </xs:documentation>
              <xs:appinfo>units:Drug code;name:Drug use for treating inpatients;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="initialACR" type="treatmentDetails">
        <xs:annotation>
          <xs:documentation>
            Initial cure rate
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;name:Initial cure rate;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="compliance" type="treatmentDetails">
        <xs:annotation>
          <xs:documentation>
            Adherence to treatment
          </xs:documentation>
          <xs:appinfo>units:Proportion;min:0;max:1;name:Adherence to treatment;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="nonCompliersEffective" type="treatmentDetails">
        <xs:annotation>
          <xs:documentation>
            Effectiveness of treatment of non compliers
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;name:Effectiveness of treatment in non-adherent patients;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="pSeekOfficialCareUncomplicated1" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Probability that a patient with newly incident
            uncomplicated disease seeks official care
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;name:Probability that a patient with uncomplicated disease seeks official care immediately;
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="pSelfTreatUncomplicated" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Probability that a patient with uncomplicated
            disease self-treats
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;name:Probability that a patient with uncomplicated disease self-treats;
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="pSeekOfficialCareUncomplicated2" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Probability that a patient with recurrence of
            uncomplicated disease seeks official care
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;name:Probability that a recurring patient seeks official care;
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="pSeekOfficialCareSevere" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Probability that a patient with severe disease
            obtains appropriate care
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;name:Probability that a patient with severe disease obtains appropriate care;
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name of health system
        </xs:documentation>
        <xs:appinfo>units:string;name:Case Management model;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="treatmentDetails">
    <xs:sequence>
      <xs:element maxOccurs="1" minOccurs="0" name="CQ" type="inputValue">
        <xs:annotation>
          <xs:documentation>Chloroquine</xs:documentation>
          <xs:appinfo>units:List of elements;name:Chloroquine;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="SP" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Sulphadoxine-pyrimethamine
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Sulphadoxine-pyrimethamine;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="AQ" type="inputValue">
        <xs:annotation>
          <xs:documentation>Amodiaquine</xs:documentation>
          <xs:appinfo>units:List of elements;name:Amodiaquine</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="SPAQ" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Sulphadoxine-pyrimethamine/Amodiaquine
          </xs:documentation>
          <xs:appinfo>units:List of elements;name:Sulphadoxine-pyrimethamine/Amodiaquine;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="ACT" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Artemisinine combination therapy
          </xs:documentation>
          <xs:appinfo>units:List of elements;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="QN" type="inputValue">
        <xs:annotation>
          <xs:documentation>Quinine</xs:documentation>
          <xs:appinfo>units:List of elements;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="selfTreatment" type="inputValue">
        <xs:annotation>
          <xs:documentation>
            Probability of self-treatment
          </xs:documentation>
          <xs:appinfo>
            units:Proportion;min:0;max:1;
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AgeGroupValues">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="group">
        <xs:annotation>
          <xs:documentation>
            A series of values according to age groups, each specified with
            a lower-bound and a value. The first lower-bound specified must be
            zero; a final upper-bound of infinity is added to complete the last
            age group. At least one age group is required. Normally these are
            interpolated by a continuous function (see interpolation attribute).
          </xs:documentation>
          <xs:appinfo>name:age group;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="inputValue">
          <xs:attribute name="lowerbound" type="xs:double" use="required">
            <xs:annotation>
              <xs:documentation>
                Lower bound of age group
              </xs:documentation>
              <xs:appinfo>units:Years;min:0;max:100;name:Lower bound;</xs:appinfo>
            </xs:annotation>
          </xs:attribute>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="interpolation" default="linear">
      <xs:annotation>
        <xs:documentation>
          Interpolation algorithm. Normally it is desirable for age-based
          values to be continuous w.r.t. age. By default linear interpolation
          is used.
          
          With all algorithms except "none", the age groups are converted to a
          set of points centred within each age range. Extra
          points are added at each end (zero and infinity) to keep value
          constant at both ends of the function. A zero-length age group may
          be used as a kind of barrier to adjust the distribution; e.g. with
          age group boundaries at 15, 20 and 25 years, a (linear) spline would
          be drawn between ages 17.5 and 22.5, whereas with boundaries at
          15, 20 and 20 years, a spline would be drawn between ages 17.5 and 20
          years (may be desired if individuals are assumed to reach adult size
          at 20).
          
          Algorithms:
          1. none: input values are used directly
          2. linear: straight lines (on an age vs. value graph) are used to
          interpolate data points.
        </xs:documentation>
        <xs:appinfo>name:interpolation;units:none;</xs:appinfo>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="none" />
          <xs:enumeration value="linear" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="HSEventScheduler">
    <xs:sequence>
      <xs:element name="uncomplicated" type="HSESCaseManagement" />
      <xs:element name="complicated" type="HSESCaseManagement" />
      <xs:element name="ClinicalOutcomes" type="ClinicalOutcomes" />
      <xs:element name="NonMalariaFevers" type="HSESNMF" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HSESCaseManagement">
    <xs:annotation>
      <xs:documentation>
        A set of decisions and a set of treatments.
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:Set of decisions;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="decisions" type="HSESDecisions"/>
      <xs:element name="treatments" type="HSESTreatments"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HSESDecisions">
    <xs:annotation>
      <xs:documentation>
        Description of decisions for a case management tree. A generic view
        of this tree would be that each decision is deterministic, or based on probabilities which
        may depend on other decisions. Probabilistic decisions are described here.
        
        In general, each decision has a name, a defined set of outcome values, and a set of
        dependent decisions mentioned by name. The following decisions, with their associated
        outcomes, are provided by the code (and may not be included here):
        
        * case (uncomplicated only): Returns "UC1" if there is no recent history
          of a malarial case, or "UC2" if there is.
        * result: Dependent on decision "test", this
          performs a parasite density test. Output is one of "none" (no test
          performed), "positive", "negative".
        
        The following decisions must be described here:
        
        * test (uncomplicated only): Outputs must be "none", "microscopy" or
          "RDT" to describe which test the "result" decision uses.
        * treatment: Describes which treatment to use. Values aren't restricted
          but must match up with a treatment described in the corresponding
          "treatments" section.
        * hospitalisation (complicated only): none, immediate or delayed.
      </xs:documentation>
      <xs:appinfo>name:Description of decisions;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="decision" type="HSESDecision" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HSESDecision">
    <xs:annotation>
      <xs:documentation>
        A decision describes how to choose between a set of values.
        
        Lexically, it can contain symbols matching "[_\.a-zA-Z0-9]+", round brackets: (),
        braces: {} and colons. Whitespace is ignored except to separate symbols.
        
        Syntactically, it must match one TREE, where SYMBOL is a symbol described above.
        (Here, "x|y" means x or y, "x+" means x occurs once or more, brackets show grouping.)
        TREE := BRANCH_SET | OUTCOME
        BRANCH_SET := BRANCH+
        BRANCH := DECISION '(' VALUE ')' ( ':' OUTCOME | '{' TREE '}' )
        OUTCOME, DECISION, VALUE := SYMBOL
        
        For each BRANCH_SET each BRANCH must have the same DECISION. This
        DECISION must be one of the dependencies mentioned in "depends". This
        may be:
        * another decision, in which case the VALUE immediately following in
          brackets must correspond to one of its output values. The BRANCH_SET immediately
          containing this BRANCH must represent each output value of the same decision
          exactly once, and no parent BRANCH_SET may be for the same DECISION.
        * "p": this indicates a probabilistic decision. In this case the value is a
          probability, the sum of all values for the BRANCH_SET must be 1 and the decision
          must be associated directly with OUTCOMEs (not sub-TREEs).
        * "age": this indicates an age-test. The VALUE must have the form "a-b",
          indicating that this branch will be taken for individuals aged such
          that <![CDATA[a <= age < b]]>, where a,b are non-negative real numbers
          or the special value "inf", and <![CDATA[a <= b]]>. All VALUEs in the
          BRANCH_SET must cover all possible (non-negative real) ages, with no
          overlap (hence, smallest a must be 0 and greatest b must be inf).
        
        Semantically, each OUTCOME must be one of the values associated with this decision.
      </xs:documentation>
      <xs:appinfo>name:Help-seeking decision;</xs:appinfo>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="name" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>
              The name of this decision. The name must match the regular expression
              "[_a-zA-Z0-9]+"; that is it can only contain letters, digits and _ characters
              (no spaces, punctuation, etc.).
            </xs:documentation>
            <xs:appinfo>name:Name of decision;</xs:appinfo>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="depends" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>
              A comma-separated list of decisions that must have already been evaluated before
              this decision can be evaluated. Can be empty. Each must be hard-coded or
              described here. Can include the special decisions "p" and "age",
              though "age" cannot be combined with any other dependency.
            </xs:documentation>
            <xs:appinfo>name:Preceding decisions;</xs:appinfo>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="values" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>
              A comma-separated list of outcome values this decision may have.
              The name of each value must be of the same form as decision names (i.e.
              only contain letters, digits and _ characters).
            </xs:documentation>
            <xs:appinfo>name:Outcome values;</xs:appinfo>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="HSESTreatments">
    <xs:annotation>
      <xs:documentation>
        A list of drug treatment tables. Each should have a name corresponding to
        one of the "drug" decision's values.
      </xs:documentation>
      <xs:appinfo>units:string;name:List of treatment tables;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="treatment" type="HSESTreatment" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HSESTreatment">
    <xs:annotation>
      <xs:documentation>
        A description of a base treatment schedule along with modifiers to handle
        delays, quality variations, etc.
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:Description of a base treatment schedule;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="schedule" type="HSESTreatmentSchedule" />
      <xs:element name="modifier" type="HSESTreatmentModifier" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name corresponding to one of the drug decision's output values.
        </xs:documentation>
        <xs:appinfo>units:string;name:Treatment administered;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="HSESTreatmentSchedule">
    <xs:annotation>
      <xs:documentation>
        The base (unmodified) schedule of drugs administered for this treatment.
      </xs:documentation>
      <xs:appinfo>units:List of elements;name:Base schedule of drugs for this treatment;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="medicate" type="medicate" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="medicate">
    <xs:attribute name="drug" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
      Abbreviated name of drug compound
        </xs:documentation>
        <xs:appinfo>units:string;name:drug;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="mg" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>Quantity of drug compound</xs:documentation>
        <xs:appinfo>units:mg;name:drug dose;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="hour" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
        Number of hours past start of timestep this drug dose is administered
        at (first dose should be at hour 0).
      </xs:documentation>
        <xs:appinfo>units:hours;min:0;name:time of administration;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="duration" type="xs:double" use="optional">
      <xs:annotation>
        <xs:documentation>
        If this attribute is given, use IV administration instead of orally.
        
        Specifies the number of hours over which the dose is administered.
      </xs:documentation>
        <xs:appinfo>units:hours;min:0;name:duration of administration;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="HSESTreatmentModifier">
    <xs:annotation>
      <xs:documentation>
        A modifier for this treatment, according to the outputs of a decision.
        
        The "decision" attribute must be the name of a known decision. Then, there must be a set of
        multipyQty, delay or selectTimeRange sub-elements, each of which corresponds to one value
        output of the decision.
      </xs:documentation>
      <xs:appinfo>units:Choice of elements;name:Treatment modifier;</xs:appinfo>
    </xs:annotation>
    <xs:choice>
      <xs:element name="multiplyQty" type="HSESTreatmentModifierEffect" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Multiplies the quantity of active ingredients of drugs administered.
            
            The "drugs" attribute is a comma-separated list of all active ingredients administered in
            the base schedule (each must be listed once) and the content of this element is a comma-
            separated list of multipliers for each active ingredient, listed in the same order as in
            the "drugs" attribute. E.g. with drugs="A,B" and content "0.5,1" the quantity of drug A is
            halved while that of B is unchanged.
          </xs:documentation>
          <xs:appinfo>units:Comma separated list of values;name:Active ingredient multipliers;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="delay" type="HSESTreatmentModifierEffect" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Delays administration of drugs listed in the base schedule by so many hours.
            
            The "drugs" attribute is a comma-separated list of all active ingredients administered in
            the base schedule (each must be listed once) and the content of this element is a comma-
            separated list of delays (in hours) for each active ingredient, listed in the same order as in
            the "drugs" attribute. E.g. with drugs="A,B" and content "0,6", drug A is administered as
            in the base schedule while drug B is administered 6 hours later than specified.
          </xs:documentation>
          <xs:appinfo>units:Comma separated list of values;name:Active ingredient delays;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="selectTimeRange" type="HSESTreatmentModifierEffect" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Selects which drug doses to administer according to time of administration (before times
            are modified by delays). Half-open interval: [x,y)
            
            The "drugs" attribute is a comma-separated list of all active ingredients administered in
            the base schedule (each must be listed once) and the content of this element is a comma-
            separated list of time-ranges (in hours) for each active ingredient, listed in the same
            order as in the "drugs" attribute. The time-ranges should be of the form x-y and are
            interpreted as the half-open interval [x,y); that is a drug listed with time t will only be
            administered if <![CDATA[x <= t < y]]>.
          </xs:documentation>
          <xs:appinfo>units:Comma separated list of values;name:Active ingredient time-ranges;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:choice>
    <xs:attribute name="decision" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Specifies the decision that this modifier acts on.
        </xs:documentation>
        <xs:appinfo>units:string;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="HSESTreatmentModifierEffect">
    <xs:attribute name="value" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Specifies a value of the decision to act on.
        </xs:documentation>
        <xs:appinfo>units:string;name:value of decision;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="effect" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Comma-separated list of the effect the modifier has on each drug, in
          the form DRUG1(EFFECT1),DRUG2(EFFECT2), etc.
        </xs:documentation>
            <xs:appinfo>units:string;name:List of drugs affected;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="affectsCost" type="xs:boolean" use="optional">
      <xs:annotation>
        <xs:documentation>
          Does this affect the cost? If false, the effective drug usage (w.r.t.
          cost) is unaffected by this modifier; if true it is. Defaults to true
          (if omitted).
          
          Is meaningless for delays.
        </xs:documentation>
        <xs:appinfo>units:none;name:Affects cost?;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="ClinicalOutcomes">
    <xs:annotation>
      <xs:documentation>
        Description of base parameters of the clinical model.
      </xs:documentation>
      <xs:appinfo>name:Clinical Outcomes;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="maxUCSeekingMemory" type="xs:int">
        <xs:annotation>
          <xs:documentation>
            Maximum number of timesteps (including first of case) an individual will
            remember they are sick before resetting.
          </xs:documentation>
          <xs:appinfo>name:Max UC treatment-seeking memory;units:days;min:0;max:unbounded</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="uncomplicatedCaseDuration" type="xs:int">
        <xs:annotation>
          <xs:documentation>
            Fixed length of an uncomplicated case of malarial/non-malarial
            sickness (from treatment seeking until return to life-as-usual).
            Usually 3.
          </xs:documentation>
          <xs:appinfo>name:Uncomplicated case duration;units:days;min:1;max:unbounded</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="complicatedCaseDuration" type="xs:int">
        <xs:annotation>
          <xs:documentation>
            Fixed length of a complicated/severe case of malaria
            (from treatment seeking until return to life-as-usual).
          </xs:documentation>
          <xs:appinfo>name:Complicated case duration;units:days;min:1;max:unbounded</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="complicatedRiskDuration" type="xs:int">
        <xs:annotation>
          <xs:documentation>
            Number of days for which humans are at risk of death during a severe
            or complicated case of malaria. Cannot be greater than the duration
            of a complicated case or less than 1 day.
          </xs:documentation>
          <xs:appinfo>name:Complicated risk duration;units:days;min:1;max:unbounded</xs:appinfo>
        </xs:annotation>
      </xs:element>
       <xs:element name="dailyPrImmUCTS" type="xs:double" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            It is sometimes desirable to model delays to treatment seeking in
            uncomplicated cases. While treatment of drugs can be delayed within
            case management trees to provide a similar effect, this doesn't
            delay any of the decisions, including diagnostics using the current
            parasite density.
            
            Instead a list of dailyPrImmUCTS elements can be used, describing
            successive daily probabilities of treatment (sum must be 1). For
            example, with a list of two elements with values 0.8 and 0.2, for
            80% of UC cases the decision tree is evaluated immediately, and for
            20% of cases evaluation is delayed by one day.
            
            For no delay, use one element with a value of 1.
          </xs:documentation>
          <xs:appinfo>name:Daily probability of immediate treatment seeking for uncomplicated cases;units:none;min:0;max:1</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HSESNMF">
    <xs:annotation>
      <xs:documentation>
        Description of non-malaria fever health-system modelling (treatment,
        outcomes and costing). Incidence is described by the 
        model->clinical->NonMalariaFevers element. Non-malaria fevers are only
        modelled if the NON_MALARIA_FEVERS option is used.
        
        As further explanation of the parameters below, we first take:
        β₀ = logit(P₀) - β₃·P(need),
        and then calculate the probability of antibiotic administration, P(AB),
        dependent on treatment seeking location.
        No seeking: P(AB) = 0
        Informal sector: logit(P(AB)) = β₀ + β₄
        Health facility: logit(P(AB)) = β₀ + β₁·I(neg) + β₂·I(pos) + β₃·I(need)
        (where I(X) is 1 when event X is true and 0 otherwise,
        logit(p)=log(p/(1-p)), event "need" is the event that death may occur
        without treatment, events "neg" and "pos" are the events that a malaria
        parasite diagnositic was used and indicated no parasites and parasites
        respectively).
      </xs:documentation>
      <xs:appinfo>name:Non-malaria fevers;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="prTreatment" type="xs:double">
        <xs:annotation>
          <xs:documentation>
            Probability of a non-malaria fever being treated with an antibiotic
            given that no malaria diagnostic was used but independent of need.
            Symbol: P₀.
          </xs:documentation>
          <xs:appinfo>name:P(treatment|no diagnostic);units:none;min:0;max:1;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="effectNegativeTest" type="xs:double">
        <xs:annotation>
          <xs:documentation>
            The effect of a negative malaria diagnostic on the odds ratio of
            receiving antibiotics. Symbol: exp(β₁).
          </xs:documentation>
          <xs:appinfo>name:Effect of a negative test;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="effectPositiveTest" type="xs:double">
        <xs:annotation>
          <xs:documentation>
            The effect of a positive malaria diagnostic on the odds ratio of
            receiving antibiotics. Symbol: exp(β₂).
          </xs:documentation>
          <xs:appinfo>name:Effect of a positive test;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="effectNeed" type="xs:double">
        <xs:annotation>
          <xs:documentation>
            The effect of needing antibiotic treatment on the odds ratio of
            receiving antibiotics. Symbol: exp(β₃).
          </xs:documentation>
          <xs:appinfo>name:Effect of need;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="effectInformal" type="xs:double">
        <xs:annotation>
          <xs:documentation>
            The effect of seeking treatment from an informal provider (i.e.
            a provider untrained in NMF diagnosis) on the odds ratio of
            receiving antibiotics. Symbol: exp(β₄)
          </xs:documentation>
          <xs:appinfo>name:Effect of informal provider;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="CFR" type="AgeGroupValues">
        <xs:annotation>
          <xs:documentation>
            Base case fatality rate for non-malaria fevers (probability of
            death from a fever requiring antibiotic treatment given that no
            antibiotic treatment is received, per age-group).
          </xs:documentation>
          <xs:appinfo>name:Case fatality rate;units:none;min:0;max:1;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="TreatmentEfficacy" type="xs:double">
        <xs:annotation>
          <xs:documentation>
            Probability that treatment would prevent a death (i.e. CFR is
            multiplied by one minus this when treatment occurs).
          </xs:documentation>
          <xs:appinfo>name:Treatment efficacy;units:none;min:0;max:1;</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!-- Drug model -->
  <xs:complexType name="drugDescription">
    <xs:sequence>
      <xs:element name="drug" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
	    Sequence of drug descriptions forming a library of drug parameters.
	    </xs:documentation>
          <xs:appinfo>name:Library of drug parameters;</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="PD">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="allele" minOccurs="1" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation>
			  PD parameters per allele, plus initial frequency of each allele.
			  
			  Note: we assume a one-to-one correspondance of drugs to loci, hence each
			  drug has an independent set of alleles here.
			    </xs:documentation>
                      <xs:appinfo>name:PD parameters per allele;</xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="initial_frequency" type="xs:double">
                          <xs:annotation>
                            <xs:documentation>
				Frequency, relative to the total frequency of all alleles for this drug/locus.
			      </xs:documentation>
                            <xs:appinfo>units:relative frequency;min:0;name:Relative frequency;</xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="max_killing_rate" type="xs:double">
                          <xs:annotation>
                            <xs:documentation>
				k1 — Maximal parasite killing rate.
			      </xs:documentation>
                            <xs:appinfo>units:1/days;min:0;name:Maximal parasite killing rate;</xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="IC50" type="xs:double">
                          <xs:annotation>
                            <xs:documentation>
				Half maximal effect concentration.
			      </xs:documentation>
                            <xs:appinfo>units:mg/l;min:0;name:IC50;</xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="slope" type="xs:double">
                          <xs:annotation>
                            <xs:documentation>
				n — Slope of the concentration effect curve
			      </xs:documentation>
                            <xs:appinfo>units:no units;name:Slope of effect curve;</xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                      <xs:attribute name="name" use="required" type="xs:string" />
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="PK">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="negligible_concentration" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>
			  Concentration below which drug's effects are deemed negligible and can
			  be removed from simulation.
			</xs:documentation>
                      <xs:appinfo>units:mg/l;min:0;name:Drug concentration considered negligible;</xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="half_life" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>
			  Used to calculate elimination rate (which is: ln(2) / half_life).
			</xs:documentation>
                      <xs:appinfo>units:days;min:0;name:drug half-life;</xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="vol_dist" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>
			  Volume of Distribution
			</xs:documentation>
                      <xs:appinfo>units:l/kg;min:0;name:Volume of Distribution;</xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="abbrev" use="required" type="xs:string" />
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!-- Host data -->
  <xs:complexType name="human">
    <xs:annotation>
      <xs:documentation>
        Parameters of host models.
      </xs:documentation>
      <xs:appinfo>name:Human;</xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="availabilityToMosquitoes" type="AgeGroupValues">
        <xs:annotation>
          <xs:documentation>
            By age group data on availability of humans to mosquitoes relative
            to an adult.
          </xs:documentation>
          <xs:appinfo>name:Availability to mosquitoes;units:None;min:0;max:1;</xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="weight" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            By age group data on human weight (mass).
          </xs:documentation>
          <xs:appinfo>name:Weight;units:kg;min:0</xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="AgeGroupValues">
              <xs:attribute name="multStdDev" type="xs:double" use="required">
                <xs:annotation>
                  <xs:documentation>
                    Each human is assigned a weight multiplier from a normal distribution
                    with mean 1 and this standard deviation at birth. His/her weight
                    is this multiplier times the mean from age distribution.
                    A standard deviation of zero for no heterogeneity is valid; a rough
                    value from Tanzanian data is 0.14.
                  </xs:documentation>
                  <xs:appinfo>name:Standard deviation;units:None;min:0</xs:appinfo>
                </xs:annotation>
              </xs:attribute>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!-- standard types used -->
  <xs:complexType name="doubleList">
    <xs:sequence>
      <xs:element name="item" maxOccurs="unbounded" type="xs:double" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DecayFunction">
    <xs:annotation>
      <xs:documentation>
        Specification of decay or survival of a parameter.
      </xs:documentation>
      <xs:appinfo>name:Decay or survival of a parameter</xs:appinfo>
    </xs:annotation>
    <xs:attribute name="function" use="required">
      <xs:annotation>
        <xs:documentation>
          Determines which decay function to use. Available decay functions,
          for age t in years:
          
          constant: 1
          
          step: 1 for t less than L, otherwise 0
          
          linear: 1 - t/L for t less than L, otherwise 0
          
          exponential: exp( - t/L * log(2) )
          
          weibull: exp( -(t/L)^k * log(2) )
          
          hill: 1 / (1 + (t/L)^k)
          
          chitnis: exp( k - k / (1 - (t/L)^2) ) for t less than L, otherwise 0
        </xs:documentation>
        <xs:appinfo>units:None;min:0;max:1;name:function;</xs:appinfo>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="constant" />
          <xs:enumeration value="step" />
          <xs:enumeration value="linear" />
          <xs:enumeration value="exponential" />
          <xs:enumeration value="weibull" />
          <xs:enumeration value="hill" />
          <xs:enumeration value="chitnis" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="L" type="xs:double" use="required">
      <xs:annotation>
        <xs:documentation>
          Scale parameter of distribution. With Chintnis' function, this is the
          age at which the parameter has decayed to 0; with the other three
          functions, this is the age at which the parameter has decayed to half
          its original value. Not used for constant decay (though must be
          specified anyway).
        </xs:documentation>
        <xs:appinfo>units:Years;min:0;name:L;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="k" type="xs:double" default="1.0">
      <xs:annotation>
        <xs:documentation>
          Shape parameter of distribution. If not specified, default value of
          1 is used. Meaning depends on function; not used in some cases.
        </xs:documentation>
        <xs:appinfo>min:0;name:k;units:none;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="sigma" type="xs:double" default="0">
      <xs:annotation>
        <xs:documentation>
        If non-zero, heterogeneity of decay is introduced via a variate sampled
        from the log-normal distribution with mu zero (i.e. median is 1) and
        this sigma. Age is then divided by this variate before being passed to
        the decay function.
        </xs:documentation>
        <xs:appinfo>min:0;name:σ (sigma);units:none;</xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="DecayFunctionValue">
    <xs:annotation>
      <xs:documentation>
        Specification of decay or survival of a parameter along with initial
        value (i.e. the decay function's value is multiplied by "initial").
      </xs:documentation>
      <xs:appinfo>name:Decay or survival of a parameter;</xs:appinfo>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DecayFunction">
        <xs:attribute name="initial" type="xs:double" use="required">
          <xs:annotation>
            <xs:documentation>
              A value multiplying the decay function, thus equal to the function's value at time 0.
            </xs:documentation>
            <xs:appinfo>units:None;min:0;max:1;name:Initial proportion;</xs:appinfo>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>