示例#1
0
        /// <summary>
        /// Gets a project evaluation
        /// with statistical remaining days
        /// based on a number of simulations.
        /// </summary>
        /// <param name="person">The person.</param>
        /// <param name="issues">The issues.</param>
        /// <param name="numberOfSimulations">The number of simulations.</param>
        /// <param name="standardNumberOfHoursPerDay">The standard number of hours per day.</param>
        /// <returns>
        /// The total project evaluation from the simulations.
        /// </returns>
        public ProjectEvaluation GetProjectEvaluation(PersonView person
            , IList<IssueView> issues
            , int numberOfSimulations
            , double standardNumberOfHoursPerDay)
        {
            // Prepares the container for the simulation results:
            ProjectEvaluation result
                = new ProjectEvaluation
                    (person
                    , standardNumberOfHoursPerDay);

            // Runs through a number of simulations for the given issues:
            for (int simulationNumber = 1;
                simulationNumber <= numberOfSimulations;
                simulationNumber++)
            {
                // In each simulation the container for simulation results
                // is passed along in order to collect the result:
                RunSimulation(issues, result);
            }

            // Returns the container with the simulation results:
            return result;
        }
示例#2
0
 private static IssueView GetIssueViewPerPerson(IssueView originalIssueView
     , PersonView personView)
 {
     var taskDetails
         = originalIssueView.Tasks
         .Where(t =>
             t.RefPersonId
             == personView.PersonId)
         .ToList();
     return new IssueView
         (originalIssueView.Issue
         , taskDetails);
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonEstimate"/> class.
 /// </summary>
 /// <param name="personView">The person view.</param>
 /// <param name="evaluations">The evaluations.</param>
 public PersonEstimate(PersonView personView
     , IList<double> evaluations)
 {
     this._personView = personView;
     this._evaluations = evaluations;
 }