Beispiel #1
0
        public override SimulationResult Simulate()
        {
            var result = new SimulationResult()
            {
                tasks = origin_tasks.ToList()
            };

            result.cpu_clips = SchdImplHelper.GetSimuResultDirectV1(
                from x in origin_tasks
                orderby x.StartTime
                select new SchdRestModel
            {
                task = x,
                rest = x.ExecuteTime,
            },
                true,
                (a, i) =>
                from y in
                (from x in a
                 where x.task.StartTime <= i
                 select new SchdRestModel
            {
                task = x.task,
                rest = x.rest,
                temp = ((double)i - (double)x.task.StartTime) / (double)x.task.ExecuteTime
            })
                orderby y.temp descending
                select y
                );
            return(result);
        }
Beispiel #2
0
        public override SimulationResult Simulate()
        {
            var result = new SimulationResult()
            {
                tasks = origin_tasks.ToList()
            };

            result.cpu_clips = SchdImplHelper.GetSimuResultDirectV2(
                from x in origin_tasks
                select new SchdRestModel
            {
                task = x,
                rest = x.ExecuteTime,
            });
            return(result);
        }
Beispiel #3
0
        public override SimulationResult Simulate()
        {
            var result = new SimulationResult()
            {
                tasks = origin_tasks.ToList()
            };

            result.cpu_clips = SchdImplHelper.GetSimuResultDirectV1(
                from x in origin_tasks
                orderby x.StartTime
                select new SchdRestModel
            {
                task = x,
                rest = x.ExecuteTime,
            },
                true,
                (a, i) =>
                from x in a
                where x.task.StartTime <= i
                select x
                );
            return(result);
        }