示例#1
0
        public void singularLandisIteration(int itr, Landis.Extension.Succession.Landispro.pdp ppdp)
        {
            DateTime ltime, time1, time2, time3, time4, ltimeTemp;
            TimeSpan ltimeDiff;

            string fptimeBU = Landis.Extension.Succession.Landispro.PlugIn.fpforTimeBU_name;

            using (StreamWriter fpforTimeBU = File.AppendText(Landis.Extension.Succession.Landispro.PlugIn.fpforTimeBU_name))
            {
                fpforTimeBU.WriteLine("\nProcessing succession at Year: {0}:", itr);

                if (itr % Succession.Landispro.PlugIn.gl_sites.TimeStepFire == 0)
                {
                    itr /= Succession.Landispro.PlugIn.gl_sites.TimeStepFire;

                    ltime = DateTime.Now;
                    Console.WriteLine("\nStart simulating fire disturbance ... at {0}.", ltime);

                    Succession.Landispro.system1.fseed(Succession.Landispro.PlugIn.gl_param.RandSeed + itr / Succession.Landispro.PlugIn.gl_sites.SuccessionTimeStep * 1);

                    time1 = DateTime.Now;
                    pFire.Activate(itr, Succession.Landispro.PlugIn.freq, Succession.Landispro.PlugIn.wAdfGeoTransform);

                    time2 = DateTime.Now;
                    pFire.Activate(itr, Succession.Landispro.PlugIn.freq, Succession.Landispro.PlugIn.wAdfGeoTransform);

                    time3 = DateTime.Now;
                    pFire.Activate(itr, Succession.Landispro.PlugIn.freq, Succession.Landispro.PlugIn.wAdfGeoTransform);

                    time4 = DateTime.Now;
                    pFire.Activate(itr / Succession.Landispro.PlugIn.gl_sites.TimeStepFire, Succession.Landispro.PlugIn.freq, Succession.Landispro.PlugIn.wAdfGeoTransform);


                    ltimeTemp = DateTime.Now;
                    ltimeDiff = ltimeTemp - ltime;
                    Console.WriteLine("Finish simulating fire disturbance at {0} took {1} seconds", DateTime.Now, ltimeDiff);
                    fpforTimeBU.WriteLine("Processing fire: " + ltimeDiff + " seconds");
                }
            }
        }
示例#2
0
 public void GetFireACTIVATE(CFIRE pf, int itr, int[] freq, double[] wAdfGeoTransform)
 {
     //  pw->activate(itr, freq, s, sp, cellSize, randSeed, numberOfIterations, gDLLMode);
     pf.Activate(itr, freq, wAdfGeoTransform);
 }