// Store path planning results to array private void StoreResults(int index) { // Plan path lstThreads[index].PlanPath(); // Storing results arrResponses[index] = new PathPlanningResponse( lstThreads[index].index, lstThreads[index].GetCDF(), lstThreads[index].GetRunTime(), lstThreads[index].GetEfficiency(), lstThreads[index].GetPath()); }
// Store path planning results to array private void StoreResults(int index) { //// Wait until it is safe to enter. //mut.WaitOne(); //Console.WriteLine("{0} has entered the protected area", // Thread.CurrentThread.Name); // Plan path lstThreads[index].PlanPath(); // I am recalculating BestCDF because the Global Warming effect lowered the probabilities double RealCDF = GetTrueCDF(lstThreads[index].GetPath()); // Storing results arrResponses[index] = new PathPlanningResponse( lstThreads[index].index, RealCDF, lstThreads[index].GetRunTime(), lstThreads[index].GetEfficiency(), lstThreads[index].GetPath()); //Console.WriteLine("{0} is leaving the protected area\r\n", // Thread.CurrentThread.Name); //// Release the Mutex. //mut.ReleaseMutex(); }
// Store path planning results to array private void StoreResults(int index) { DateTime startTime2 = DateTime.Now; // Plan path lstThreads[index].PlanPath(); // I am recalculating BestCDF because the Global Warming effect lowered the probabilities double RealCDF = GetTrueCDF(lstThreads[index].GetPath()); // Storing results arrResponses[index] = new PathPlanningResponse( lstThreads[index].index, RealCDF, lstThreads[index].GetRunTime(), lstThreads[index].GetEfficiency(), lstThreads[index].GetPath()); DateTime stopTime2 = DateTime.Now; TimeSpan duration2 = stopTime2 - startTime2; double RunTime2 = duration2.TotalSeconds; if (ProjectConstants.DebugMode) { curRequest.SetLog(lstThreads[index].GetCurRequest().AlgToUse + " took " + RunTime2 + " seconds.\n"); } }
// Store path planning results to array private void StoreResults(int index) { // Plan path for seg2 lstThreads[index].PlanPath(); // Storing results arrResponses[index] = new PathPlanningResponse( lstThreads[index].index, lstThreads[index].GetCDF(), lstThreads[index].GetRunTime(), lstThreads[index].GetEfficiency(), lstThreads[index].GetPath()); // Plan path for seg3 lstThreads[index + 1].SetmDist(lstThreads[index].GetmCurDist()); lstThreads[index + 1].PlanPath(); // Storing results arrResponses[index + 1] = new PathPlanningResponse( lstThreads[index + 1].index, lstThreads[index + 1].GetCDF(), lstThreads[index + 1].GetRunTime(), lstThreads[index + 1].GetEfficiency(), lstThreads[index + 1].GetPath()); }