public TaskToSchedule ReadNext(int index)
        {
            var list = FromStreamListReader.ReadIntList(StreamReader);

            return(new TaskToSchedule()
            {
                Length = list[0],
                CostForLead = list[1],
                CostForDelay = list[2],
                Index = index
            });
        }
Ejemplo n.º 2
0
        public Instance ReadNext(int id)
        {
            var tasks = new List <TaskToSchedule>();

            var amountOfTasks = FromStreamListReader.ReadIntList(StreamReader).First();
            var taskReader    = new TaskToScheduleReader()
            {
                StreamReader = StreamReader
            };

            for (int i = 0; i < amountOfTasks; i++)
            {
                tasks.Add(taskReader.ReadNext(i));
            }

            return(new Instance()
            {
                Tasks = tasks,
                K = id,
                FileNameWithoutExtension = FileNameWithoutExtension
            });
        }