"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/engine/generate_pre.cpp" between
fet-5.47.0.tar.bz2 and fet-5.47.1.tar.bz2

About: FET allows to automatically schedule a timetable for e.g. of a school, high-school or university.

generate_pre.cpp  (fet-5.47.0.tar.bz2):generate_pre.cpp  (fet-5.47.1.tar.bz2)
skipping to change at line 10859 skipping to change at line 10859
|| (nIncompatibleFromFather[i]==nIncompatibleFromFather[ j] && nMinDaysConstraintsBroken[i]==nMinDaysConstraintsBroken[j] && nIncompatibl e[i]>=nIncompatible[j] ) ); || (nIncompatibleFromFather[i]==nIncompatibleFromFather[ j] && nMinDaysConstraintsBroken[i]==nMinDaysConstraintsBroken[j] && nIncompatibl e[i]>=nIncompatible[j] ) );
} }
} }
if(VERBOSE){ if(VERBOSE){
cout<<"The order of activities (id-s):"<<endl; cout<<"The order of activities (id-s):"<<endl;
for(int i=0; i<gt.rules.nInternalActivities; i++){ for(int i=0; i<gt.rules.nInternalActivities; i++){
cout<<"No: "<<i+1; cout<<"No: "<<i+1;
Activity* act=&gt.rules.internalActivitiesList[permutatio n[i]]; Activity* act=&gt.rules.internalActivitiesList[permutatio n[i]];
cout<<", id="<<act->id; cout<<", Id="<<act->id;
cout<<", teachers: ";
bool spacerBefore=false, spacerAfter=false;
if(act->isSplit()){
if(act->id==act->activityGroupId){
spacerBefore=false;
spacerAfter=true;
}
else{
spacerBefore=true;
spacerAfter=false;
}
}
cout<<", ";
if(spacerBefore)
cout<<" ";
if(act->isSplit())
cout<<"Duration: "<<act->duration<<"/"<<act->tota
lDuration;
else
cout<<"Duration: "<<act->duration;
cout<<", ";
if(spacerAfter)
cout<<" ";
cout<<"Teachers: ";
QString tj=act->teachersNames.join(" "); QString tj=act->teachersNames.join(" ");
cout<<qPrintable(tj); cout<<qPrintable(tj);
cout<<", subject: "<<qPrintable(act->subjectName); cout<<", Subject: "<<qPrintable(act->subjectName);
if(act->activityTagsNames.count()>0){ if(act->activityTagsNames.count()>0){
QString atj=act->activityTagsNames.join(" "); QString atj=act->activityTagsNames.join(" ");
cout<<", activity tags: "<<qPrintable(atj); cout<<", Activity tags: "<<qPrintable(atj);
} }
cout<<", students: "; cout<<", Students: ";
QString sj=act->studentsNames.join(" "); QString sj=act->studentsNames.join(" ");
cout<<qPrintable(sj); cout<<qPrintable(sj);
cout<<", nIncompatible[permutation[i]]="<<nIncompatible[p ermutation[i]]; cout<<", nIncompatible[permutation[i]]="<<nIncompatible[p ermutation[i]];
if(nMinDaysConstraintsBroken[permutation[i]]>0.0) if(nMinDaysConstraintsBroken[permutation[i]]>0.0)
cout<<", nMinDaysConstraintsBroken[permutation[i] ]="<<nMinDaysConstraintsBroken[permutation[i]]; cout<<", nMinDaysConstraintsBroken[permutation[i] ]="<<nMinDaysConstraintsBroken[permutation[i]];
if(gt.rules.groupActivitiesInInitialOrderList.count()>0) if(gt.rules.groupActivitiesInInitialOrderList.count()>0)
if(fatherActivityInInitialOrder[permutation[i]]>= 0) if(fatherActivityInInitialOrder[permutation[i]]>= 0)
cout<<" (grouped with id "<<gt.rules.inte rnalActivitiesList[fatherActivityInInitialOrder[permutation[i]]].id<<")"; cout<<" (grouped with id "<<gt.rules.inte rnalActivitiesList[fatherActivityInInitialOrder[permutation[i]]].id<<")";
skipping to change at line 10902 skipping to change at line 10925
for(int i=0; i<gt.rules.nInternalActivities; i++){ for(int i=0; i<gt.rules.nInternalActivities; i++){
initialOrderOfActivitiesIndices[i]=permutation[i]; initialOrderOfActivitiesIndices[i]=permutation[i];
s+=GeneratePreTranslate::tr("No: %1", "Number").arg(i+1); s+=GeneratePreTranslate::tr("No: %1", "Number").arg(i+1);
s+=", "; s+=", ";
Activity* act=&gt.rules.internalActivitiesList[permutation[i]]; Activity* act=&gt.rules.internalActivitiesList[permutation[i]];
s+=GeneratePreTranslate::tr("Id: %1", "Id of activity").arg(act-> id); s+=GeneratePreTranslate::tr("Id: %1", "Id of activity").arg(act-> id);
s+=", "; s+=", ";
bool spacerBefore=false, spacerAfter=false;
if(act->isSplit()){
if(act->id==act->activityGroupId){
spacerBefore=false;
spacerAfter=true;
}
else{
spacerBefore=true;
spacerAfter=false;
}
}
if(spacerBefore)
s+=" ";
if(act->isSplit())
s+=GeneratePreTranslate::tr("Duration: %1").arg(CustomFET
String::number(act->duration)+QString("/")+CustomFETString::number(act->totalDur
ation));
else
s+=GeneratePreTranslate::tr("Duration: %1").arg(act->dura
tion);
s+=", ";
if(spacerAfter)
s+=" ";
s+=GeneratePreTranslate::tr("Teachers: %1").arg(act->teachersName s.join(", ")); s+=GeneratePreTranslate::tr("Teachers: %1").arg(act->teachersName s.join(", "));
s+=", "; s+=", ";
s+=GeneratePreTranslate::tr("Subject: %1").arg(act->subjectName); s+=GeneratePreTranslate::tr("Subject: %1").arg(act->subjectName);
s+=", "; s+=", ";
//if(act->activityTagsNames.count()>0) //if(act->activityTagsNames.count()>0)
s+=GeneratePreTranslate::tr("Activity tags: %1").arg(act->activit yTagsNames.join(", ")); s+=GeneratePreTranslate::tr("Activity tags: %1").arg(act->activit yTagsNames.join(", "));
s+=", "; s+=", ";
s+=GeneratePreTranslate::tr("Students: %1").arg(act->studentsName s.join(", ")); s+=GeneratePreTranslate::tr("Students: %1").arg(act->studentsName s.join(", "));
if(gt.rules.groupActivitiesInInitialOrderList.count()>0){ if(gt.rules.groupActivitiesInInitialOrderList.count()>0){
 End of changes. 5 change blocks. 
5 lines changed or deleted 53 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)