/// <summary>Called to start the job.</summary> /// <param name="jobManager">The job manager running this job.</param> /// <param name="workerThread">The thread this job is running on.</param> public void Run(JobManager jobManager, BackgroundWorker workerThread) { Simulation clonedSim = Apsim.Clone(simulation) as Simulation; Simulations simulations = Apsim.Parent(simulation, typeof(Simulations)) as Simulations; simulation.FileName = simulations.FileName; Simulations.MakeSubstitutions(simulations, new List <Simulation> { clonedSim }); Simulations.CallOnLoaded(clonedSim); jobManager.AddChildJob(this, clonedSim); }