Algorithm For Checking Jobs Run In Sequence


The jobs tested are the simulations, spreadsheet jobs and the bot jobs.

This is based on knowing the immediate prerequisites for any job.

The algorithm simply checks if all immediate prerequisites for a job have been run before it.

Below we document what the immediate prerequisites for any job are.

The immediate prerequisites of the simulation for Sim type S (Base, Rerun or Policy) for year X are:

the simulation for year X-1 of the same Sim type S (because the starting data for the simulation for year X is updated data from the simulation for year X-1) and

the bot job for year X if S is the Rerun or Policy (since this bot job prepares results from the Base for the simulation for year X).

[That is, the run up to the simulation S for year X is not in sequence if either of these immediate prerequisites has not been run or has been run after the simulation S for year X.]

[Note that, although the simulation for year X of the Base is a prerequisite of the simulation for year X of the Policy, it is not an immediate prerequisite.]

The immediate prerequisites of the bot job for year X are:

the simulation for year X from the Base (because the bot job selects results from the Base to use in the Rerun and Policy), and

the simulation for year X-1 of the Rerun if you are doing the Rerun, otherwise of the Policy. This is because the starting data for that Bot job come from the data updated after that simulation.

The immediate prerequisites of a spreadsheet job for Sim type S are:

the simulations for Sim type S for the years for which are creating the spreadsheet.

The immediate prerequisites of the differences spreadsheet job are:

The year-on-year spreadsheets from the Policy and the previous run (Rerun if doing it, otherwise Base) which are taking differences between. [These are the spreadsheet files which cover the Policy years specified.]



URL of this topic: www.copsmodels.com/webhelp/rundynam/hc_seqalg.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage