Experimenting with Process Models


You can use experiments to explore different potential scenarios with a process model. For example if you want to understand how a process will run when it has half the people working on it, or double the people, you can automatically generate and compare simulation runs with those parameters.

See the experiments section for more on experiments in HASH in general.

To run an experiment, you'll want to first identify the parameter of the process you want to explore. For example, in a model with a service block:

// Snippet of a process model

{
  "support_resources_solving_stuff": {
    "time": 2,
    "resource": "service_agents",
    "track_wait": true
  },
  "service_agents": 6
}

In this model we could run experiments with the “service_agents” property and see how it responds to different numbers of agents.

To do that, we'll set service_agents as a global parameter.

The Globals section describes how and why to use globals.

  1. Add a property to globals.json.

    globals.json

    {
      "num_service_agents": 6
    }
    
  2. Replace the property on the process model with the global parameter.

    // create_process.js
    
    "service_agents": Math.floor(context.globals().num_service_agents),
    
  3. Create an experiment and use the parameter as the field for the experiment

Experiment model

Now when we run the experiment, we can see how varying the number of service agents effects the descriptive metrics of the process model.

After adding metrics and charts, we can see what happens to the queue in the experiment. Provided the number of agents stays above 1, the queue will remain flat.

Previous

Join our community of HASH developers