Herramienta de análisis de riesgos

Realización de análisis de riesgos

Aspose.Tasks for .NET API admite realizar análisis de riesgos en un archivo de datos del proyecto. Esto se basa en la simulación de Monte Carlo que admite diferentes distribuciones y correlaciones de probabilidad. La clase Aspose.tasks.riskanalysis.riskAnalyzer se puede utilizar para realizar el análisis de riesgos basado en un cronograma de proyecto (duraciones de tareas y sus fechas de inicio/finalización). Por lo tanto, una fecha de finalización del proyecto puede ser la salida de dicho análisis. El siguiente ejemplo ilustra esta funcionalidad paso a paso.

Realización de análisis de riesgos

Preparación de configuraciones de análisis

1RiskAnalysisSettings settings = new RiskAnalysisSettings();
2
3// Set number of iterations for Monte Carlo simulation (the default value is 100).
4settings.IterationsCount = 200;

Identifying the Input of Analysis

 1Project project = new Project("New Project.mpp");
 2Task task = project.RootTask.Children.GetById(17);
 3
 4// Initialize a risk pattern
 5RiskPattern pattern = new RiskPattern(task);
 6
 7// Select a distribution type for the random number generator to generate possible values from (only two types currently supported, namely normal and uniform)
 8// For more details see here: https://en.wikipedia.org/wiki/Normal_distribution)
 9pattern.Distribution = ProbabilityDistributionType.Normal;
10
11// Set the percentage of the most likely task duration which can happen in the best possible project scenario 
12// The default value is 75, which means that if the estimated specified task duration is 4 days then the optimistic duration will be 3 days
13pattern.Optimistic = 70;
14
15// Set the percentage of the most likely task duration which can happen in the worst possible project scenario 
16// The default value is 125, which means that if the estimated specified task duration is 4 days then the pessimistic duration will be 5 days.
17pattern.Pessimistic = 130;
18
19// Set a confidence level that correspond to the percentage of the time the actual values will be within optimistic and pessimistic estimates. 
20// You can think of it as a value of standard deviation: the more uncertain about your estimates you are, the more the value of standard deviation used in random number generator is
21pattern.ConfidenceLevel = ConfidenceLevel.CL75;
22
23settings.Patterns.Add(pattern);
1// Analyze the project risks
2RiskAnalyzer analyzer = new RiskAnalyzer(settings);
3RiskAnalysisResult analysisResult = analyzer.Analyze(project);

Use the Results of the Analysis

 1// Select the desired output (here we get early finish of the root task)
 2RiskItemStatistics rootEarlyFinish = analysisResult.GetRiskItems(RiskItemType.EarlyFinish).Get(project.RootTask);
 3Console.WriteLine("Expected value: {0}", rootEarlyFinish.ExpectedValue);
 4Console.WriteLine("StandardDeviation: {0}", rootEarlyFinish.StandardDeviation);
 5Console.WriteLine("10% Percentile: {0}", rootEarlyFinish.GetPercentile(10));
 6Console.WriteLine("50% Percentile: {0}", rootEarlyFinish.GetPercentile(50));
 7Console.WriteLine("90% Percentile: {0}", rootEarlyFinish.GetPercentile(90));
 8Console.WriteLine("Minimum: {0}", rootEarlyFinish.Minimum);
 9Console.WriteLine("Maximum: {0}", rootEarlyFinish.Maximum);
10analysisResult.SaveReport("AnalysisReport_out.pdf");

Conclusión

La función de análisis de riesgos de Aspose.Tasks para .NET permite a los desarrolladores evaluar la incertidumbre en los cronogramas de proyectos mediante la simulación de variaciones en la duración de las tareas mediante métodos de Monte Carlo. Al configurar parámetros de entrada como distribuciones de probabilidad, correlaciones de tareas y opciones de análisis, la clase RiskAnalyzer puede estimar resultados como la fecha de finalización del proyecto.

Esta función está diseñada para integrarse en flujos de trabajo de planificación de proyectos donde se requiere un análisis cuantitativo del riesgo del cronograma. Los resultados pueden utilizarse para respaldar la toma de decisiones del proyecto o para identificar las tareas con mayor impacto potencial en la fiabilidad del cronograma.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.