Checking that the Prequisites are Ok


When you ask to run some jobs (maybe several simulations or some simulations and spreadsheet jobs), this is the second main check the software carries out before it starts the job running.

This is referred to as checking if prerequisites are still ok. This is a check as to whether or not the results you will produce will be the same as if you were to run everything from the start of the Base.

This check is not done if you are starting your run from the first year of the Base.

When RunDynam carries out this check, it uses the information stored in the Record of Runs files corresponding to the Sim Names currently showing on the Sim Overview page.

Example 1. A simple example will help you to understand this checking.

Suppose that you are about to carry out a job which begins by doing the simulation for year 4 of the Base. This will start from updated data files produced when year 3 of the Base was run. When the software checks the prerequisites for this job, it will check that this file exists and is the same (that is, has the same time and date) as the one created when the simulation for year 3 of the Base was run. [The time, date and size of that file was recorded by RunDynam when that simulation was run.]

Suppose that one of these updated data files is different from the file created when you last ran the simulation for year number 3 of the Base. Then if you were to run the first 3 years of the Base again, you would expect to get a different updated file from the one currently on the disk. [Firstly suppose that all inputs (for example, the Closure and Shocks files for the first 3 years of the Base on the Closure/Shocks page) are the still the same as when you last ran years 1 to 3 of the Base. Then you would expect to get the same updated data file as before. And that is apparently different from the file currently on the disk. Suppose alternatively that some inputs are different from when you last ran years 1 to 3 of the Base. Then you have no idea as to whether or not the updated file you would get is the same as the one on the disk.] So the software will tell you that there is a problem with the prerequisites for the simulation for year 4 of the Base since this updated data file is different from the one which was created when you last ran the simulation for year number 3 of the Base.

In Example 1 above, the file in question was a file created by one of the jobs.

You will be told that prerequisites are not ok if an input file for a prerequisite job is different from what it was when you last ran that job, as the next example explains.

Example 2. An example where an input has changed since you last ran the relevant job.

Suppose that you are about to carry out a job which begins by doing the simulation for year 4 of the Base. The simulations for years 1 to 3 of the Base are prerequisites for this simulation (in the sense that their outputs affect the result of the simulation for year 4 of the Base).

Suppose that the Base Shocks file (on the Closure/Shocks page) for year 2 is different now from what it was when you last ran year 2 of the Base. [The time, date and size of that file was recorded by RunDynam when that simulation was run.]

Then the prerequisites for year 4 of the Base are not ok. If you were to run years 1 to 3 of the Base now, you would expect to get different results for year 2 than you last did. This would mean that the results for year 3 would also be different and so the results for year 4 would also be different from what you will get if you start with year 4 now.

[On the other hand, it does not matter whether or not the Base Shocks file for year 4 of the Base has changed since you last ran that simulation (if, indeed you ever did) since you are going to run that simulation again this time.]

So again, checking prerequisites is all about checking whether or not the results you are about to get will be the same as those you would get if you were to run everything starting at the beginning (that is, starting from the first year of the Base). And checking the prerequisites depends on what is going to be run as part of the run you are starting.

More generally, when RunDynam checks that the prerequisites for a job are ok, the following checks are carried out.

RunDynam runs through all jobs (simulations, BOT jobs and spreadsheet jobs) starting from year 1 and going to later years. For each job, if that job is not going to be run but is a prerequisite for a job which is to be run, RunDynam

checks all direct inputs to the job. For each direct input, if it is not going to be created by another job which will be run, RunDynam checks to see if it is the same (date, time and size) as when you last ran the job.

checks all direct outputs from the job to see if they are the same now as when you last ran the job. [The output (or results) files checked are those shown in the top two panels Spreadsheet and Results RSL files Covering All Years and Results for Individual Years of the Which Results to Check form shown when you ask Are Results Ok?.]

This is the basic algorithm used by RunDynam for checking prerequisites. You can read more details about that algorithm here.

If RunDynam finds that a problem with the prerequisites for any job you are about to run,

RunDynam will tell you the name of the prerequisite file which is not ok and explain why it is not ok. [Sometimes the reason given is a bit complicated. It is easy to print the reason.]

RunDynam will ask you if you want to continue checking. You can decide either way. If you continue checking, you may be told about other prerequisites which RunDynam thinks are not ok.

Once RunDynam has checked all prerequisites, or you have said that you dont want any more checking done, RunDynam will ask if you want to try to carry out the runs despite what it thinks are problems with the prerequisites. You can elect to carry on. If so, unless there is a bug in this part of the checking, you will be about to produce results which will be different from those you would produce if you started at the beginning (that is, from the first year of the Base).

Occasionally, when RunDynam tells you that a certain prerequisite is not ok, you may think that the software is mistaken. If so, you can override the software by taking the opportunity presented to ignore the apparent discrepancy, and to try running the simulation anyhow. [But please tell the developers so that they can remove the bug.]



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

Link to full GEMPACK Manual

Link to GEMPACK homepage