(defEntity population :participants (size growth-rate))
Participant class declarations may also be employed within model fragments to provide a more specific definition of the meaning of the source-participants and the target-participants. In this way, participant specifications are constrained to be a feature of another participant by means of the :entity statement, as the following example illustrates:
(defModelFragment define-population-growth-phenomenon :source-participants ((?p :type population)) :target-participants ((?ps :type stock :entity (size ?p)) (?pg :type variable :entity (growth-rate ?p)) (?pb :type flow) (?pd :type flow)) :assumptions ((relevant growth ?p)) :postconditions ((== ?pg (- ?pb ?pd)) (flow ?pb source ?pl) (flow ?pd ?pl sink)))
Furthermore, participant class declarations may define one class to be an immediate subclass of another. For example, the population participant class of holometabolous insects (e.g. butterflies) may be defined as a subclass of the population participant class:
(defEntity holometabolous-insect-population :subclass-of (population) :participants (larva-number pupa-number adult-number))
In this way, a participant type hierarchy is defined. Each subclass inherits all participants of its superclasses (i.e. its immediate superclass and superclasses of superclasses).
In summary, a participant class declaration is a tuple
where
is a participant class,
called the immediate superclass of the participant class and
is a
set of participants classes that describe important features of the
participant class.