Next: Using the Assembler Preprocessor, Previous: Memory Efficient Cloning the Probability Profile, Up: Assembler Programs [Contents][Index]

Use the function described below to unload statistics and a probability profile from a node.

- Function:
*int***qsmm_node_unload***(qsmm_t*`model`, qsmm_sig_t`node`) This function performs the following operations on a node of a multinode

`model`:- – if the node is a probability profile user, break off its correspondence with a node acting as a probability profile source;
- – unload statistics collected on the event history for the node;
- – unload the probability profile of the node;
- – if the node has an assembler program loaded, unload information on controlled and output probability variables defined in the assembler program;
- – if the node has an assembler program loaded, unload information about names assigned to the states of this assembler program;
- – unload an assembler program template used for disassembling;
- – destroy the cache of calculated probabilities of output probability variables and the cache of calculated probabilities of choice alternatives.

The argument

`node`specifies the identifier of this node.The function returns a non-negative value on success or a negative error code on failure. Currently, the function can return the following error codes.

`QSMM_ERR_NOTFOUND`

A node with identifier

`node`does not exist.`QSMM_ERR_PROFSRCP`

The node is a probability profile source for other nodes. See Memory Efficient Cloning the Probability Profile, for more information on this mode.

`QSMM_ERR_UNTIMELY`

The model instance does not exist.

`QSMM_ERR_STORAGE`

A Storage API function reported storage failure.

`QSMM_ERR_STATS`

Inconsistent statistics on an action choice state or cycle type detected.

`QSMM_ERR_ILSEQ`

Unable to convert a multibyte string to a wide string or vice versa according to a current locale.

`QSMM_ERR_NOMEM`

There was not enough memory to perform the operation.

Errors

`QSMM_ERR_STORAGE`

,`QSMM_ERR_STATS`

,`QSMM_ERR_ILSEQ`

, and`QSMM_ERR_NOMEM`

can leave the probability profile of this node or its statistics in inconsistent state. If after removing a reason of this error a repeated call to this function succeeds, the probability profile and statistics become unloaded.