As of August 2024, International Journal "Notes on Intuitionistic Fuzzy Sets" is being indexed in Scopus.
Please check our Instructions to Authors and send your manuscripts to nifs.journal@gmail.com. Next issue: March 2025.

GN XML format

From Ifigenia, the wiki for intuitionistic fuzzy sets and generalized nets
Jump to navigation Jump to search

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

  • <gn> — the root tag of the generalized net (GN) definition
  • <transitions>, <tokens>, <places> — contain one or more definitions for transitions, tokens and places, respectively
  • <transition>, <token>, <place> — contain a separate definition for each of the corresponding GN elements
  • <generator> — a definition of a token generator, extends the <token> tag
  • <char> — 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".
  • <functions> — contain inline definitions of GNTCFL functions and empty <import> tags with filenames of files to import
  • <inputs>, <outputs> — contain a list of the identifiers of the input and output places for the transition
  • <predicates> — 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 — an identifier for the corresponding element. All identifiers must be unique.
  • priority — a non-negative integer, stating the priority of the transition, token or place. Default priority is 0.
  • gn.name — a description of the GN model
  • gn.time — the lifetime of the model on the global time scale. Must be positive.
  • import.fundefs — 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 — an integer >= -1, which states the capacity of the place, default is -1 meaning infinity.
  • place.char — 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 — a Boolean value (1,0, true, false), which states whether the tokens in this place merge
  • place.mergeRule — the identifier of a characteristic GNTCFL function with a single parameter, which defines the way in which token characteristics merge
  • token.host — the identifier of a place, where the token enters the GN
  • token.entering — 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 — the time moment in which the token should leave the GN model ("die"). An integer >= -1, default is -1, meaning infinity.
  • char.name — the name of the named characteristic, must be an identifier
  • char.type — describes the type of the token characteristic. Possible values are "double", "string", "vector".
  • char.history — 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.
  • generator.period — the period of a periodic generator. By default 1 (every step).
  • generator.predicate — the activation condition of a conditional generator. By default "true" (every step).
  • generator.type — 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.

Example: test.xml

        <?xml version="1.0"?>
        <gn name="A Test GN" time="10">
                <transitions>
                <transition id="Z1">
                        <inputs> P1 P2        </inputs>
                        <outputs> P2 </outputs>
                        <predicates>
                                true
                                less_than_10
                        </predicates>
                </transition>
        </transitions>
        <places>
                <place id="P1"/>
                <place id="P2" char="inc"/>
        </places>
        <tokens>
                <token id="T1" host="P1">
                        <char name="Default" type="double"> 0 </char>
                </token>
        </tokens>
        <functions>
                (defun inc "" () ()
                        (set (+ token 1)))
                (defun less_than_10 "1;tokens.T1.char" () ()
                        (< #0 10))
        </functions>
        </gn>

References