예제 #1
0
        public static NextResource Select(Dictionary <int, Employee> employee)
        {
            var latestStartTime = _FindLatestStartTime(employee);

            var startLateList = _FindEmployeeWithST(latestStartTime, employee);

            var nextPerson = new NextResource {
                Resource = startLateList[0], AvailableTime = startLateList[0].FreeTime
            };

            return(nextPerson);
        }
예제 #2
0
        private static void _taskSetInfo(Task nextTask, NextResource nextPerson)
        {
            nextTask.TakenBy   = nextPerson.Resource;
            nextTask.IsStaffed = true;

            if (nextTask.Eft.CompareTo(nextPerson.Resource.StartWork) < 0)
            {
                nextTask.ST = nextTask.Est;
            }
            else
            {
                if (nextPerson.AvailableTime.CompareTo(nextTask.Est) > 0)
                {
                    nextTask.ST = nextPerson.AvailableTime;
                }
                else
                {
                    nextTask.ST = nextTask.Est;
                }
            }
            nextTask.FT = nextTask.ST + new TimeSpan(nextTask.Duration, 0, 0, 0);
        }
예제 #3
0
 private static void _rsourceSetInfo(Task nextTask, NextResource nextPerson)
 {
     nextPerson.Resource.StartWork = nextTask.ST;
     nextPerson.Resource.FreeTime  = nextTask.FT;
 }