4.2 Creating a Multinode Model

A handle of qsmm_t type refers to a multinode model. The function qsmm_create creates a multinode model according to specified initial parameters and returns its handle. The function qsmm_destroy destroys a multinode model specified by its handle. A number of functions fetch initial model parameters after creating a model. The handle of a multinode model can have a number of arbitrary pointers associated with it.

After creating an empty model, an application program should register instruction meta-classes and instruction class sets defining assembler instruction sets for model nodes. Instruction meta-classes specify instruction-centric model behavior. Instruction class sets specify node-centric model behavior. An instruction meta-class is an entity for an assembler instruction name. An individual instruction class belongs to an instruction meta-class, is a member of an instruction class set, and represents an assembler instruction with specific parameters. Every instruction meta-class requires providing an event handler function. An instruction class set can have an event handler function too.

After registering one or more instruction class sets, an application program should create nodes belonging to node classes represented by the instruction class sets. Every node has a numeric identifier, a state transition matrix maintained by the environment state identification engine, and an action emission matrix maintained by the instruction emitting engine. Both engines exist in a model instance scope holding model execution parameters. After creating a model instance, it may be necessary to override default parameters of actors representing the engines.