Creating and Running a Simulation

{"URL":["aai/web/v2/simulation/active/create"],"heroDescriptionIdentifier":"ice_simulation_running_intro","customCards":[{"id":"ice_simulation_understanding","title":"Understanding Simulations","type":"customize","languages":["en-us"],"contextURL":["https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Simulation.htm"]},{"id":"ice_simulation_restrictions","title":"Restrictions for Simulations","type":"customize","languages":["en-us"],"contextURL":["https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Simulation_Run.htm"]},{"id":"ice_simulation_running","title":"Creating and Running a Simulation","type":"customize","languages":["en-us"],"contextURL":["https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Simulation_Run.htm"]}]}

You can run a simulation of changes to job definitions for your AutoSys schedulers to test job definition changes without affecting your actual jobstream runs and production SLAs.

This topic describes how to create and run such a simulation in AAI. Specifically, this topic covers the following:

Restrictions and Requirements for Simulation

AutoSys only

The simulation feature can only be used for jobs that run on AutoSys schedulers without cross-scheduler dependencies.  

Scheduler requirement: Next generation prediction model

Furthermore, the AutoSys scheduler must be defined to use the next generation prediction model. For information, see Adding/Editing/Deleting AutoSys Schedulers.

Tip:

On the Systems page, where all defined schedulers are listed, you can easily see which generation prediction model an AutoSys scheduler is defined to use. AutoSys schedulers defined with the next generation prediction model have the scheduler type AutoSys V2. For more information, see The Scheduler List in Schedulers.

If your AutoSys scheduler does not use the next generation prediction model and you want to run a simulation on it, you can add the same scheduler in AAI and define that with the next generation prediction model. The two schedulers can run along side each other in AAI.

Admins only

Only users with admin rights can run simulations. For all other users, the link to access the simulation feature does not appear on their screen.

Preparing JIL Code for a Simulation

Before you enter a simulation for your AutoSys jobs, you have to prepare the JIL code for the changes that you want to test. You can have this in a JIL file for upload or a code block for pasting. When you have the changes ready, use the following steps to define and run a simulation of those changes to see how they would affect the performance of the jobstream SLA.

Creating and Running a Simulation

To define a simulation, describe your proposed job definition changes in an AutoSys JIL file that you provide to the simulation. You can define some global overrides to make the simulation more realistic, like overriding status hold-ups. With these specifications, you run the simulation and then examine the results.

Important!

You can only have one simulation active at one time on an AAI instance. This means that when you run a new simulation, as described in the steps that follow, you overwrite the definition and results of any simulation that is currently running.
It is recommended that, if you want to run a previous simulation, make sure to document its JIL code and other settings to be able to recreate the previous simulations. When working on a team, establish a process so that you do not collide with each other's efforts.

Use the following instructions for running a simulation:

Preparation:

Before you enter a simulation for your AutoSys jobs, you have to prepare the JIL code for the changes that you want to test. You can have this in a JIL file for upload or a code block for pasting. When you have the changes ready, use the following steps to define and run a simulation of those changes to see how they would affect the performance of the jobstream SLA.

  1. In the left navigation pane, select Simulation.

    Note:

    If you do not see this item, then you do not have the required admin rights.

    The Simulations page opens, showing the results of any active simulations.  

  2. Click Run a new simulation.

  3. Under Simulation Settings, provide the following specifications for your proposed simulation:

    1. In Scheduler select the scheduler where the jobs that you want to test changes for are located. Only schedulers of the AutoSys V2 type are listed.

    2. In Simulation Time, select or enter the date and time that you want the simulation predictions to be calculated for. This can be particularly helpful if you want to focus on a critical day of the week.  

    3. In JIL Definition enter the JIL code for the changes that you want to test. You can do this in several ways:

      • If you have prepared the code elsewhere, copy and then paste it here.

      • If you have prepared a file with the JIL code, click Append JIL contents from a file and select the file.

      • Type in the code.

  4. Click Next. If the code has syntax errors, a message appears informing you of those errors. You can go back and fix them before continuing.

  5. Optionally, under Global State Rules enter rules for any execution states that you want to be overridden during the simulated runs.

    For example, you might want to have a job that comes into an Inactive state to be overridden as having a Success state, so that the simulation is not delayed. You might also know some time considerations that are realistic to expect

    1. Click Add Rule.

    2. Select the Change from state and then the to state for a state override and substitution.

    3. To add another rule, click Add Rule and continue as before.

  6. Optionally, enter exceptions to the global rules for specific jobs that you want to have a different state override.

    1. Click Add Exceptions.

    2. In Job Name Contains, type a string that will filter for your jobs.

    3. Optionally, select a current execution State that the jobs must have, or leave it set to All for all execution states.   If you want to add exceptions for jobs of different specific current states, you can search and add them one state at a time, using Add Exceptions each time.

    4. Click Search. A list of jobs that match your search criteria appears.

    5. Select the jobs that you want to specify an override status, then click OK.

    6. On the Run [Simulation] page, you see all the jobs your selected. For each one, select a to state to be applied to the job in the simulation run.

    7. To add more jobs with exceptions, click Add Exceptions and continue as before.

  7. Click Finish. The simulation runs and AAI predicts the execution behavior and effects. If a dialog appears confirming that the simulation was successful, click OK. The results of the simulation appear on the active Simulation page. For information, see Understanding Simulation Results.