Algorithm Used to Check Prerequisites are Ok


This describes the algorithm used by RunDynam to check, before you start a run, whether or not prerequisite files are ok. 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 since that affects what files will be created as part of the run.

The Algorithm

RunDynam loops through all the years. For each year it loops through the jobs in the order simulation for the Base, BOT job, simulation for Rerun (if being done), simulation for the Policy. After all years are finished, RunDynam loops through the spreadsheet jobs in the order Base, Rerun then Policy.

For each such job, are checking that we would expect to get the same outputs as are currently on the disk if we were to run the job again now.

For each such job,

is it going to be run as part of what you are about to run? If so, nothing to check, so go to the next job.

is this job a prerequisite for any job being run? If not, is nothing to check, so go to the next job. [Identifying if a job is a prerequisite for a job being run is based on the idea of an immediate prerequisite for a job.]

has this job been run? [This is checked by looking at the relevant Record of Runs file.] If not give an error and stop checking.

has this job been run in sequence with its immediate predecessors (those jobs which are an immediate prerequisite for this job)? If not, report that and continue checking.

are the direct inputs to this job unchanged from when they were last produced? If not, report and continue checking.

are the outputs from this job unchanged from when they were last produced? If not, report and continue checking. [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 ends the checking for this job. Go on to the next job.

When checking that direct inputs or outputs are unchanged, simply check that the time, date and size are the same as when the relevant job was last run. [This does not guarantee that the files are the same but makes it highly likely.]



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

Link to full GEMPACK Manual

Link to GEMPACK homepage