Written by Mahmoud Osman on Thursday July 27th 2017 in Latest News

SIMUL8 Tip: Calculate & Display Utilization for an Activity that Uses Replications

If you have a system where an activity can be processing more than one job at a time, or where the same task is worked on by multiple activities in parallel, then you’ll want to consider using SIMUL8’s ‘Replicate’ feature.

 

Using a simple simulation model example, we’ll show you how to calculate the utilization of an activity that is using replications using SIMUL8’s results manager and Visual Logic features.

 
Download example simulation
 

Using groups

The first option is to use the Group feature. The way SIMUL8 collects results for groups is binary (i.e. it monitors if the machine is on or off, regardless of how many replications are working).

For example, if you have an activity with two replications, and you always have only one work item in the activity, the group result will display 100% utilized and not 50%, because one of the replications was always working.

To create a group and display the results, you will need to set a new group for each activity with replications:

  1. Right click on the Activity
  2. Click “Create Group”
  3. Click “Results”
  4. Click the “Pie Chart” icon on the bottom right of the window

Replications blog post 1

Instantaneous Utilization

If you want to calculate the instantaneous utilization of the activity (i.e. in this moment of time how many machines of your total replications are being used), we can use SIMUL8’s powerful Visual Logic feature.

First, we’ll create a variable that will hold this value:

  1. Ribbon / Tool Bar > Data and Rules > Information Store > New
    Tip: It’s good practice to start your variables with a prefix and give the variable a meaningful name. Here, we’ll use “gbl_InstantaneousUtilization”
  2.  
    replications-blog-post-2
     
    We then want brand viagra pfizer canada to update the value of this variable every time we load a work item into the activity and every time we finish working on a work item.

    Visual Logic https://www.cassanodante.edu.it/cial-is-discount/ can be triggered by particular events related to each simulation object. In this example, we’ll use the following two events “After Loading” and “Before Exit”:
     

  3. Click on the activity
  4. Ribbon / Tool Bar > Additional > Events > After Loading
  5.  
    replications-blog-post-3
     
    This will open the Visual Logic window and we can update the variable using the “Set” function:

  6. Right click anywhere on the Visual Logic window
  7. Click on “Set” and enter this function
    Set gbl_InstantaneousUtilization = [Activity 1.Count Contents/Activity 1.Replication]*100
  8. Close the Visual Logic window
  9. Repeat this for Ribbon / Tool Bar > Additional > Events > Before Exit

 
replications-blog-post-4
 
To display the “gbl_InstantaneousUtilization” variable on screen:

  1. Ribbon / Tool Bar > Insert > Data Bar
    This will display a bar chart that continuously cheap propecia online reads the variable value.
  2. replications-blog-post-5

  3. Ribbon / Tool Bar > Insert > Visual Data
    This will display viagra no perscription usa the value of the variable.

 
replications-blog-post-6
 

Average Utilization

To calculate the average utilization of an activity with replications, taking into account the utilization of each individual replication over time, we’ll use a few other SIMUL8 features.

First of all we will create a dummy resource – this won’t be a physical resource in the real system, but we’ll utilize the functionalities of the resource to record the average utilization of the activity with replications.

  1. Create a new Resource
  2. Assign the resource to the Activity
  3. Click on the Resource > Ribbon / Tool Bar > Properties > Number Available >
    Set the “Number Available” to the same number of replications on your machine

Tip: It’s good practice to link the number of the available resources of the dummy resource to the number of replications on the activity, so that SIMUL8 automatically updates the number if it ever changes.
 
We will set this link on reset using Visual Logic – every time you click the reset button, SIMUL8 will read the number of replications on the activity and update the number of resources available:

  1. Ribbon / Tool Bar > Visual Logic > Time Based > On Reset
  2. Right click anywhere on the Visual Logic window > Set
  3. Set Resource 1.Max Available = Activity 1.Replication

 
replications-blog-post-7
 
For example, now we have a machine with 5 replications and a dummy resource pfizer viagra cheap with 5 available. Since the resource is only linked to this one activity, the resource utilization will record the utilization buying viagra in chicago of the activity and take into account the utilization of each of the individual replications.

If you run the simulation, click on the dummy resource then Ribbon / Tool Bar -> Properties -> Results, you will see the online purchase cialis utilization results.

There levitra generic ordering are several ways to display this result on the screen.

The first method is to display the utilization of the dummy resource instead of the count:

  1. Ribbon / Tool Bar > File > Preferences > Display > Data display when simulation stopped > Utilization
    Note: this will change the display for the whole simulation, not just this particular resource / activity. Every resource and activity in your simulation model will now display the utilization instead of the count. Any activity with replications will only display the count and will not display the utilization.
  2.  
    replications-blog-post-8
     
    To record the utilization into a variable, we will need to first create a new variable. Similar to before:

    1. Ribbon / Tool Bar > Data and Rules > Information Store > New
      Tip: It is good practice to start your variables with a prefix and give your variable a meaningful name, here we use “gbl_AverageUtilization”
    2. In this method, we want to read the results of the dummy resource utilization while the simulation is running. To do so, we first need to add the utilization of the dummy resources to our Results Manager.

    3. Click on the dummy resource > Ribbon / Tool Bar > Properties > Results
    4. Hover your cursor over the utilization number value > right click to add to the results manager
    5.  
      replications-blog-post-9
       
      We then want to update the value of this variable every time we load a work item into the activity and every time we finish working on a work item.

      Visual Logic can be triggered by particular events related to each simulation object. In this example, we will use the following two events “After Loading” and “Before Exit”.

    6. Click on the activity
    7. Ribbon / Tool Bar > Additional > Events > After Loading
    8. This will open the Visual Logic window and we can update the variable using the “Get Current Run Result Value” function:

    9. Right click anywhere on the Visual Logic window > Command > Any
    10. Get Current Run Result Value gbl_AverageUtilization, Resource 1, 1, 0
      Note: the “1,0” at the end of the function are SIMUL8 pre-defined location for the resource utilization
    11. Close the Visual Logic window
    12. Repeat for Ribbon / Tool Bar > Additional > Events > Before Exit
    13.  
      replications-blog-post-10
       
      To display the “gbl_InstantaneousUtilization” variable on screen:
       

    14. Ribbon / Tool Bar > Insert > Data Bar
      This will display a bar chart that continuously reads the variable value
    15. Ribbon / Tool Bar > Insert > Visual Data
      This will display the value of the variable

     

    Looking for more SIMUL8 help and information?

    If you’re a SIMUL8 user, visit our Support Portal for more tips and technical insight.