Professional Documents
Culture Documents
i i i i i i iAsignment i#2
Name:
i i i i i i I Abdullah iAbbas
Roll iNo:
i i i i i i i i i17581556-026
Department:
i i i i i i i i i IInformation iTechnology
Submitted iTo:
i i i i i i i i i iMa’am iSamina iNaz
I
Time itable ischeduler iwith igenetic ialgoritm
// iTime-space islots, ione ientry irepresent ione ihour iin ione iclassroom
vector<list<CourseClass*>> i_slots;
// iNumber iof iclasses ithat iis imoved irandomly iby isingle imutation ioperation
int i_mutationSize;
public:
private:
i i i i// iReturns iTRUE iif ichromosome ibelongs ito ibest ichromosome igroup
i i i ibool iIsInBest(int ichromosomeIndex);
i i i i// iClears ibest ichromosome igroup
i i i ivoid iClearBest();
};
// iHandles ievent ithat iis iraised
// iwhen ialgorithm ifinds inew ibest ichromosome
void iNewBestChromosome(const iSchedule& inewChromosome);
#course
i i i iid i= i1
i i i iname i= iIntroduction ito iProgramming
#end
#room
i i i iname i= iR1
i i i ilab i= itrue
i i i isize i= i24
#end
#group
i i i iid i= i1
i i i iname i= i1O1
i i i isize i= i19
#end
#class
i i i iprofessor i= i1
i i i icourse i= i1
i i i iduration i= i2
i i i igroup i= i1
i i i igroup i= i2
#end
#class
i i i iprofessor i= i1
i i i icourse i= i1
i i i iduration i= i3
i i i igroup i= i1
i i i ilab i= itrue
#end
#class
i i i iprofessor i= i1
i i i icourse i= i1
i i i iduration i= i3
i i i igroup i= i2
i i i ilab i= itrue
#end
public:
i i i ivoid iParseFile(char* ifileName);
private:
i i i ilist<CourseClass*> i_courseClasses;
public:
i i i iinline iProfessor* iGetProfessorById(int iid) i//...
i i i iinline iint iGetNumberOfProfessors() iconst i//...
i i i iinline iStudentsGroup* iGetStudentsGroupById(int iid) i//...
i i i iinline iint iGetNumberOfStudentGroups() iconst i//...