The purpose of this exercise is to set up a framework for creating plug-in algorithms that can be easily reused for any algorithm. You will test the framework with a simple algorithm: Random order for single machine. When the exercise is complete, you will be able to reuse the framework again and again for implementations of more complicated algorithms, not having to worry about stuff such as reading and writing from files anymore.
This is a three week exercise composed of intermediate due-dates. At each such due-date, your group will receive a grade for the progress achieved so far.
Below are the intermediary goals and their respective dates:
An estimate of the size of this project is 20 programmer hours. Divide this up by 3 programmers and 3 weeks and you should be ok. It is recommended that you assign a "group leader/coordinator" for each group. This should be the person with the most OO experience/understanding. Having such a designated leader in the group will make your joint work more efficient.
The framework should contain some abstract class such as class Algorithm. Specific algorithms will be inherited from this class. The framework shouldn't care which algorithm it is working with, it should know to call some method of the algorithm such as schedule(). This method should be a pure virtual method in class Algorithm and should be implemented differently for each algorithm class that we will implement during the continuation of the course (starting with random). It seems pretty reasonable that the constructor for the algorithm class will receive pointers to the machines, jobs and schedule classes.
Note1: You should re-read the help from lekin about implementing algorithms and pay close attention to what it says about objective functions. Your algorithm class should have some sort of static method such as whichObjectives() which returns the objective functions which are suppurated.
Note2: You should also pay attention to the differences between single machines, job shops and flow shops and incorporate these in your classes.
Below is a skeleton of what the framework may look like (just a non-formal suggestion):
int main(int argc, char ** argv) { //parse argv here int objective=;//value of objective parsed from argv try{ Schedule schedule("filename"); Jobs jobs("filename"); Machines machines("filename"); }catch(/*catch file input exceptions here and exit(1)*/){} Algorithm * palgorithm = new randomAlgorithm(cout,&schedule, &jobs,&machines,objective); //NOTE: the above literal, randomAlgorithm, is the only thing that should change when you continue the course and implement a different algorithm. (This is what creating a framework and using polymorphism is all about.) //NOTE2: I thought it is nice to have the algorithm get a refernce to an ostream //so that it doesn't necssarily need to write comments to cout (stdout). //But can actually write to a diffrent output stream such as a file output stream. if(*palgorithm does not suppurts objective) exit(1); try{ palgorithm->(&schedule,&jobs,&machines,objective); }catch//catch scheduling errors schedule.writeToFile(); return 0; }Good Luck