Analyzing Process Models

Once you've created your process model, you'll want to use it to answer questions about its performance. Creating plots will make it easy and visually engaging to interpret the results of your simulation runs.

The Process Modeling Library is designed to let you easily access metrics in three different areas: task completions, timing, and resource usage. Examples of all of these can be found in the model that is initialized in the Process Modeling Library project.

Task Completions

Counting objects that make it from a source to a sink

Sink blocks are end-points in your process models. As objects reach them they are counted, representing completed tasks on a production line, a delivery chain, or a quality inspection. The Sink block automatically stores information about objects it receives in the process_data field on your agent.

You can easily build plots to access this information. Each Sink stores its data under a key formatted as<sink_name>_count. A Metric which accesses the data for the above graph would look like:

The graph above can be generated by using this metric in a timeseries plot.


Recording the average time objects spend in the model

Process models are useful for determining the timing of complex chains of actions. Service and Seize blocks can record the time spent waiting for resources to become available. You can enable this by setting "track_wait": true in a block's corresponding parameters.

Sink blocks can record all the waits an object experienced, as well as the total time it took the object to traverse the model. You can enable this by setting "record_wait_times": true and "record_through_times": true in the block's corresponding parameters.

To create a timing plot first create metrics which access the appropriate wwait_time.<service_name> and through_time.<sink_name>, which are located in the process_data field on the agent. Then specify a "timeseries" plot with those metrics. Note that "wait times" are keyed to a Service block, while "through times" are keyed to a Sink.

Resource Usage

Visualizing the utilization of different resources in a process model

Each Service or Seize/Release block in your process agent has an associated resource property specified in its parameters. If you'd like to have easy access to data about the usage of each of these resources, you can add the @hash/process/resource_data.js behavior to your agent. This behavior calculates the proportion of resources currently in use, and stores the data in the process_data field.

To use the behavior, you'll also need to specify a new object in process_parameters :

"process_parameters": {
"max_resources": {
"senior_billers": 3,
"account_billers": 4,
"billing_clerks": 3,
"printers": 1

The max_resources parameter must specify the maximum, or starting number, of resources the agent begins with. The above plot could now be generated by defining the proper Metrics (one per resource) **and Plot**.

Metric definition for one resource
Plot definition