-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSchedule.h
More file actions
91 lines (58 loc) · 2.71 KB
/
Schedule.h
File metadata and controls
91 lines (58 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#pragma once
/************************************************************************************************
* File: Schedule.h
* Author: Stephen Thomson & Stephen Carter & Abbey DuBois
* Date: 3/14/2024
* Description: This is the header file for the Schedule class.
* This class is used to store a list of tasksets and perform operations on them.
*************************************************************************************************/
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <chrono>
#include "TaskSet.h"
class Schedule
{
private:
vector<TaskSet> m_tasksets;
public:
Schedule();
~Schedule();
Schedule& operator=(const Schedule& schedule);
void addTaskSet(TaskSet taskset);
void removeTaskSet(int index);
void printTaskSets();
void printTaskSet(int index);
bool readTaskSets(string filename);
void writeResults(string filename, int numruns, Schedule* EDF, Schedule* LLF, Schedule* AlgorithmA);
void clearTaskSets();
int getNumTaskSets();
TaskSet getTaskSet(int index);
vector<TaskSet> getTaskSets();
virtual void setTaskSet(int index, TaskSet taskset);
void setTaskSets(vector<TaskSet> tasksets);
double getTimeEDF(int index, Schedule* EDF);
double getTimeLLF(int index, Schedule* LLF);
double getTimeAlgorithmA(int index, Schedule* AlgorithmA);
double getAverageTimeEDF(int index, int numruns, Schedule* EDF);
double getAverageTimeLLF(int index, int numruns, Schedule* LLF);
double getAverageTimeAlgorithmA(int index, int numruns, Schedule* AlgorithmA);
void printScheduleEDF(int index, int numruns, Schedule* EDF);
void printScheduleLLF(int index, int numruns, Schedule* LLF);
void printScheduleAlgorithmA(int index, int numruns, Schedule* AlgorithmA);
void printSchedules(int index, int numruns, Schedule* EDF, Schedule* LLF, Schedule* AlgorithmA);
void printScheduleEDFAll(int numruns, Schedule * EDF);
void printScheduleLLFAll(int numruns, Schedule* LLF);
void printScheduleAlgorithmAAll(int numruns, Schedule * AlgorithmA);
void printSchedulesAll(int numruns, Schedule* EDF, Schedule* LLF, Schedule* AlgorithmA);
virtual string algorithmASchedule();
virtual string runEDF_Algorithm();
void setAlgorithmsMemberVariables(Schedule* Algorithm);
virtual string CheckLLFSchedule();
protected:
unsigned long long m_lcm;
int m_processors;
vector<Task> addInAdditionalTasks(vector<Task> set);
string configureSetToOutput(vector<vector<Task>> schedule, bool feasible);
};