public void OnProgressReported(IAlgorithmProgressReport report) { lock (report) { //Send to Orleans } }
public static AlgorithmProgressReportViewModel AsReportViewModel(this IAlgorithmProgressReport report) { return(new AlgorithmProgressReportViewModel { ReportDate = report.ReportDate, Accepted = report.Accepted, CurrentFitness = report.CurrentFitness, ProcessorTime = report.ProcessorTime, CurrentSolution = report.CurrentSolution.Select(n => new GraphNodeViewModel { Key = n.Key, Neighbours = n.Neighbours.Select(ngh => ngh.Key).ToList() }).ToList() }); }
/// <summary> /// Action performed on solution finding progress change /// </summary> /// <param name="algorithmProgress"></param> protected virtual void OnProgressChanged(IAlgorithmProgressReport algorithmProgress) { CurrentProgressReport = algorithmProgress; TotalProcessorTimeCost = algorithmProgress.ProcessorTime; }