Time Check VL

Time Check Visual logic code is executed at set intervals. This enables you to control or change parameters of your simulation on a recurring basis.

Examples include to daily update a Resource’s availability based on spreadsheets, setting the capacity of a Queue to a different value each day, etc.

You can find Time Check VL under the Visual Logic tab. There, you can define the logic that will be executed, the first time the logic is executed, and the interval at which it is executed. You can do this through the Time Check Properties dialog, found on the dropdown of Time Check VL.

More specifically, to define what logic is executed, select “Time Check” under the Time Check VL options. A window will pop-up where you can write your VL code.

You can define the Simulation Time that the Time Check VL is executed for the first time and then the interval at which it will be triggered through the “Time Check Properties” dialog, found on the dropdown options of Time Check VL.

Time Check VL example

Here, we present an example of how Time Check VL can be used. The internal spreadsheet called “ss_OperatorsShift” defines the Number available for the Resource “Operators”. This simulation runs using Days as a time unit and runs for 5 weeks. You can find out how to change the time units of your simulation here.

Time Check will be executed each day, starting from the start of the simulation. Time Check Properties will be set as follows.

Then by using the DAY and WEEK Math Functions , the ss_OperatorsShift columns and rows are referenced, and the Number available for the Operators resource is set accordingly.

For example, if we are on Day 1 of the simulation (Monday in this case), and on Week 1, the Number available for Operators is 4.

Simul8 Time Check example