GN XML format

The generalized net model structure is defined in XML 1.0 syntax. See also GNschema.xsd.

A comprehensive set of XML tag and attribute definitions is shown on the following tree diagram. The tags are displayed in rectangles and the attributes - in ellipses. Required attributes are underlined.



GN XML tags

 *  — the root tag of the generalized net (GN) definition
 * , ,  — contain one or more definitions for transitions, tokens and places, respectively
 * , ,  — contain a separate definition for each of the corresponding GN elements
 *   — a definition of a token generator, extends the   tag
 *   — a named characteristic definition, contains the initial value of the characteristic. This can be:
 * a real constant for type "double",
 * a vector constant for type "vector" — a list of constants, enclosed in square brackets (for example: [1 "string" 3.5]),
 * any other value is treated like a string constant for type "string".
 *   — contain inline definitions of GNTCFL functions and empty  </tt> tags with filenames of files to import
 * , </tt> — contain a list of the identifiers of the input and output places for the transition
 *  </tt> — contains a list of the identifiers of predicates, defined in the GNCTFL file. The list describes the predicate matrix of the transition, which is listed row by row, starting with the first. The list must contain exactly m×n identifiers, where m and n are the number of input and output places of the transition. Valid identifiers are also "true" and "false", which represent the corresponding constant predicates.

GN XML attributes

 * id</tt> — an identifier for the corresponding element. All identifiers must be unique.
 * priority</tt> — a non-negative integer, stating the priority of the transition, token or place. Default priority is 0.
 * gn.name</tt> — a description of the GN model
 * gn.time</tt> — the lifetime of the model on the global time scale. Must be positive.
 * import.fundefs</tt> — the name of the imported GNTCFL file used for characteristic functions and predicates for this model. A full absolute or relative path must be specified.
 * place.capacity</tt> — an integer >= -1, which states the capacity of the place, default is -1 meaning infinity.
 * place.char</tt> — the identifier of a characteristic function for the place, defined in the GNTCFL file. A valid identifier is also "ID" that represents the identity function, which is also the default characteristic function, if a value for this attribute is not specified.
 * place.merge</tt> — a Boolean value (1,0, true, false), which states whether the tokens in this place merge
 * place.mergeRule</tt> — the identifier of a characteristic GNTCFL function with a single parameter, which defines the way in which token characteristics merge
 * token.host</tt> — the identifier of a place, where the token enters the GN
 * token.entering</tt> — the time moment in which the token enters the GN model, a non-negative integer, default is 0 — the starting moment of the GN life.
 * token.leaving</tt> — the time moment in which the token should leave the GN model ("die"). An integer >= -1, default is -1, meaning infinity.
 * char.name</tt> — the name of the named characteristic, must be an identifier
 * char.type</tt> — describes the type of the token characteristic. Possible values are "double", "string", "vector".
 * <tt>char.history</tt> — an integer >= 1, showing the number of characteristics, which the token keeps as history. The value is 1 by default, stating that the token "remembers" only its last characteristic.
 * <tt>generator.period</tt> — the period of a periodic generator. By default 1 (every step).
 * <tt>generator.predicate</tt> — the activation condition of a conditional generator. By default "true" (every step).
 * <tt>generator.type</tt> — a string, specifying the type of generator:
 * periodic — emits a token every period time steps,
 * conditional — emits a token on each time step, for which predicate evaluates to true.