Task Node Model Description

This model defines the basic building block for workflow simulation. It consists of three major functional blocks: the input queue, the task execution block and the output decision block.

Tokens enter the model at any of its input ports and exit the model at any of its output ports. The number of input and output ports is determined dynamically for each instance of the model by construction of the system topology.

A Task Node represents the lowest level job that needs to be performed by a set of resources. The set of resources may represent a specific type of skilled person, a number of different types of persons, a piece of equipment or no resource at all. Each task is characterized by a number of attributes, such as the expected task execution time and task priority. In addition, each task calls a number of functions that may be customized by the user for tracking or processing specific information. See User Functions.

A token entering any of the input ports of the task node represents a work order for the task to be executed when all required resources and conditions are met. Multiple tokens may enter concurrently at the input ports or at rapid succession. Multiple tasks may be executed in parallel within a Task Node as long as there are sufficient resources left to execute the task. When conditions or sufficient resources are not available to execute the task, tokens entering the node will be queued up in an input queue until the conditions are met. Tokens generally flow from one task node to another as defined by the data-flow-graph, each task node representing a small piece of the total job that needs to be performed on each token.

Task Attributes

Task attributes are defined by the user via the CSIM Data Flow Graph (DFG) Graphical User Interface (GUI) or via an XL spreadsheet in conjunction with a conversion utility. A Task Node has the following attributes.

TASK_ID

A unique number assigned by the user to each Task Node. If the user does not assign a number, the model will use its internally generated id as the task id.

Priority

An integer representing the task priority. Higher numbers represent lower priorities. A task of higher priority (lower number) that requires a resource used by another task of lower priority (higher number) may preempt the other task to suspend its execution and use its resources. The default priority is 1.

Suspend {Restart Resume}

The Suspend attribute describes the action to be taken by this task when it is preempted. If this attribute is set to Restart, then the task is terminated and the token is put back at the head of the queue to restart from the beginning of the task when conditions and resources become available again. If the attribute is set to Resume, then the suspended task will continue execution for the time left in completing the task, when the resources become available again. If this attribute is not set to either mode, then this task may not be preempted by another task, regardless of its Priority setting.

Queue Type {FIFO LIFO PRIO}

This QType attribute describes the type of input queue to be used in front of the Task Node. The default type is a FIFO. A PRIOrity queue sorts the tokens by their (token) priority, not the task priority. Here again, a lower value represents higher token priority. A token in a priority queue with the highest priority (or oldest arrival time when tokens are of equal priority) will be served next.

Q Priority

This QPriority attribute is used to assign a value to the tokens of a priority queue. The value of this attribute may be the name of a function. When no value is assigned to this attribute, the priority of all tokens in the queue will be defaulted to 1. When a constant numeric value is assigned to this attribute, the priority of all tokens in the queue will be assigned to the same constant value. When a function name is used, the function will be called to evaluate the value of the priority of each token. Each token may have a different tag upon entering the queue which may affect the value assigned to its priority.

Task_Type {TASK GEN}

A task node can be classified either of type TASK or GEN. The default type is TASK. A GEN node is to be used for generating tokens to start the simulation. It would be used as the first node at the beginning of a string of nodes. It should not be used by nodes that are in the middle of a string of nodes. Multiple GEN nodes may be used in a diagram showing multiple entry or starting points. However, nodes that have no input arc do not have to be GEN nodes. They could be defined as TASK nodes if they receive their input tokens from an external user application module that uses the Start function to inject tokens. Generally, a GEN node should not be used for receiving external tokens from a Start function. A GEN node generates a token at time 0, unless specified otherwise by the GEN_Start attribute.  A feedback arc may be used from the output of the GEN node or any other node to generate additional tokens at a desired interval. All other attributes may also apply to the GEN node, such as specifying the node delay.

GEN_Start

It sets a lower limit on the time when new tokens may be received by a Start function and when the first token may be generated by a GEN node.

GEN_Stop

It sets an upper limit on the time when new tokens may be received by a Start function and when new tokens may be generated by a GEN node.

Meantime

Meantime is the average time that it would take to execute the task. It may be a numeric value or a name of a function that would be called to compute the average time.

Distribution {Normal Expon Gamma Rect Lognormal}

The Distribution defines the type of statistical distribution which will be used to compute the task execution time. The current supported distributions are: normal, exponential, gamma, rectangular and lognormal.

Standard_Deviation

This is the standard deviation that is used with the selected Distribution for the specified Meantime.

Release_Conditions

This attribute defines the name of the release function to be used for this task. A token can not start execution unless the release conditions are satisfied. If no conditions are required, this attribute should not be set or be set to a 1.

Required_Resources

The Required_Resources attribute is a listing of the resources that are required to execute the task. If no resources are required, no resources will be listed. If the resources are not available, the token will wait until they become available before starting execution of the task. The listing of the resources may be separated by spaces, commas or tabs. The list of the resource names must be enclosed by double quotes.

The fraction of the resource that is required for the task execution is listed as a separate attribute. If 100% of the resource is required, the fraction does not have to be specified, or it could be set to 1.0.

Here is an example of the Required_Resources attribute:

	Required_Resources = "operator"
operator = 0.7
Another example:
	Required_Resources = "operator1 operator2 operator3"
operator1 = 0.4
operator2 = 0.6
operator3 = 0.3
Resource_Type {ANY ALL}

The Required_Resources attribute has two available options: ANY or ALL. The default attribute is set to ANY. When the Resource_Type is set to ANY, then only one of the listed resources is required for task execution. The first resource in the list is the primary resource, the second in the list is the secondary resource, and so on. The task will attempt to first use the primary resource, if it is available. If not, it will attempt to use the second and so on. If none of the resources are available, it will wait until any one becomes available.

When the Resource_Type is set to ALL, then all the resources listed in the Required_Resources attribute need to become available for task execution.

Situation_Awareness

The Situation_Awareness attribute lists the resources that would be affected by execution of this task. It adds a load to the resources specified. The format of the resource list is the same as in the Required_Resources attribute. However, the prefix "SA_" must be added to the resource name. The load for each resource is specified as a separate attribute.

For example:

	Situation_Awareness = "SA_operator2, SA_operator5"
SA_operator2 = 0.1
SA_operator5 = 0.05
SA_Duration

The duration of the load of this task on the Situation_Awareness resources is usually not for the entire execution time of the task. The SA_Duration attribute defines the time that the resources would be loaded due to this task. If this attribute is not specified, the duration is defaulted to 5 seconds.

EnterEffect

This attribute defines the name of a user function that is executed before a token enters the input queue. It is optional.

DepartEffect

This attribute defines the name of a user function that is executed when a token is dequeued from the input queue. It is optional.

BeginEffect

This attribute defines the name of a user function that is executed right before the task for the token is performed, after all conditions and resources are available. It is optional.

LaunchEffect

This attribute defines the name of a user function that is executed right before the task for the token is performed, after all conditions and resources are available. It is mainly used for display functions. It is optional.

EndEffect

This attribute defines the name of a user function that is executed after a token has completed its task execution and is ready to be sent out it output ports. It is optional.

OUTPORTS {MULTI PROB TACTICAL}

The OUTPORTS attribute defines one of three options for specifying how the processed token is to be sent out. Each port may also have an attribute which assigns the port a value. The attribute may be a numerical constant or a name of a user function that evaluates to a numeric value. The port attribute format is: portname = port_value

In the MULTI mode, the token is sent out on all ports except for the ones having a port attribute value equal to 0.

In the PROB mode, the token is sent out on only one of the ports randomly selected and based on the probabilities assigned to each port. The probability of each port is calculated as the ratio of the value assigned to the port relative to the sum of the values assigned to all the ports.

In the TACTICAL mode, the token is sent out on only one port having the greatest port numerical value.

The default mode for the outputs is MULTI.

Here is an example for setting the OUTPORTS:

	OUTPORTS = PROB
Port1 = 10
Port2 = 15
Port3 = 25

The port-names (Port1, ..., Port3 are examples only), must match the actual output port-names of the given task-box (case-sensitive). The probability values are relative. They do not need to add to 100, but can for convenience. If not, the relative probability will be based on their sum.