Back to index

fet  5.18.0
generate_pre.h
Go to the documentation of this file.
00001 /*
00002 File generate_pre.h
00003 */
00004 
00005 /*
00006 Copyright 2007 Lalescu Liviu.
00007 
00008 This file is part of FET.
00009 
00010 FET is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU General Public License as published by
00012 the Free Software Foundation; either version 2 of the License, or
00013 (at your option) any later version.
00014 
00015 FET is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with FET; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 
00025 #ifndef GENERATE_PRE_H
00026 #define GENERATE_PRE_H
00027 
00028 #include "timetable_defs.h"
00029 #include "timetable.h"
00030 
00031 #include "matrix.h"
00032 
00033 #include <QSet>
00034 #include <QHash>
00035 #include <QList>
00036 
00037 #include <QTextStream>
00038 
00039 class QWidget;
00040 
00041 bool compareFunctionGeneratePre(int i, int j);
00042 
00043 extern int permutation[MAX_ACTIVITIES]; //the permutation matrix to obtain activities in
00044 //decreasing difficulty order
00045 
00046 bool processTimeSpaceConstraints(QWidget* parent, QTextStream* initialOrderStream=NULL);
00047 
00048 
00050 //extern bool activitiesConflicting[MAX_ACTIVITIES][MAX_ACTIVITIES];
00051 //extern qint8 activitiesConflictingPercentage[MAX_ACTIVITIES][MAX_ACTIVITIES]; //-1 for not conflicting,
00052 extern Matrix2D<qint8> activitiesConflictingPercentage; //-1 for not conflicting,
00053 //a value >=0 equal with the weight of the maximum weightPercentage of a basic time constraint
00054 
00055 bool computeActivitiesConflictingPercentage(QWidget* parent);
00056 //void computeActivitiesConflicting();
00057 
00058 void sortActivities(const QHash<int, int> & reprSameStartingTime, const QHash<int, QSet<int> > & reprSameActivitiesSet, QTextStream* initialOrderStream=NULL);
00060 
00061 
00063 extern Matrix1D<QList<int> > minDaysListOfActivities;
00064 extern Matrix1D<QList<int> > minDaysListOfMinDays;
00065 extern Matrix1D<QList<double> > minDaysListOfWeightPercentages;
00066 extern Matrix1D<QList<bool> > minDaysListOfConsecutiveIfSameDay;
00067 
00068 bool computeMinDays(QWidget* parent);
00070 
00071 
00073 extern Matrix1D<QList<int> > maxDaysListOfActivities;
00074 extern Matrix1D<QList<int> > maxDaysListOfMaxDays;
00075 extern Matrix1D<QList<double> > maxDaysListOfWeightPercentages;
00076 
00077 bool computeMaxDays(QWidget* parent);
00079 
00080 
00082 extern Matrix1D<QList<int> > minGapsBetweenActivitiesListOfActivities;
00083 extern Matrix1D<QList<int> > minGapsBetweenActivitiesListOfMinGaps;
00084 extern Matrix1D<QList<double> > minGapsBetweenActivitiesListOfWeightPercentages;
00085 
00086 bool computeMinGapsBetweenActivities(QWidget* parent);
00088 
00089 
00092 //percentage of allowed time, -1 if no restriction
00093 //extern double notAllowedTimesPercentages[MAX_ACTIVITIES][MAX_HOURS_PER_WEEK];
00094 extern Matrix2D<double> notAllowedTimesPercentages;
00095 
00096 //break, which is not considered gap, false means no break, true means 100% break
00097 //break can only be 100% or none
00098 //extern bool breakDayHour[MAX_DAYS_PER_WEEK][MAX_HOURS_PER_DAY];
00099 extern Matrix2D<bool> breakDayHour;
00100 
00101 //students set not available, which is not considered gap, false means available, true means 100% not available
00102 //students set not available can only be 100% or none
00103 //extern bool subgroupNotAvailableDayHour[MAX_TOTAL_SUBGROUPS][MAX_DAYS_PER_WEEK][MAX_HOURS_PER_DAY];
00104 extern Matrix3D<bool> subgroupNotAvailableDayHour;
00105 
00106 //teacher not available, which is not considered gap, false means available, true means 100% not available
00107 //teacher not available can only be 100% or none
00108 //extern bool teacherNotAvailableDayHour[MAX_TEACHERS][MAX_DAYS_PER_WEEK][MAX_HOURS_PER_DAY];
00109 extern Matrix3D<bool> teacherNotAvailableDayHour;
00110 
00111 bool computeNotAllowedTimesPercentages(QWidget* parent);
00114 
00115 
00117 bool computeNHoursPerSubgroup(QWidget* parent);
00118 bool computeSubgroupsEarlyAndMaxGapsPercentages(QWidget* parent);
00119 
00120 extern double subgroupsEarlyMaxBeginningsAtSecondHourPercentage[MAX_TOTAL_SUBGROUPS];
00121 extern int subgroupsEarlyMaxBeginningsAtSecondHourMaxBeginnings[MAX_TOTAL_SUBGROUPS];
00122 extern double subgroupsMaxGapsPerWeekPercentage[MAX_TOTAL_SUBGROUPS];
00123 extern int subgroupsMaxGapsPerWeekMaxGaps[MAX_TOTAL_SUBGROUPS];
00124 
00125 extern int nHoursPerSubgroup[MAX_TOTAL_SUBGROUPS]; //used also for students min hours daily
00126 
00127 //max gaps per day (not perfect!!!)
00128 bool computeSubgroupsMaxGapsPerDayPercentages(QWidget* parent);
00129 
00130 extern double subgroupsMaxGapsPerDayPercentage[MAX_TOTAL_SUBGROUPS];
00131 extern int subgroupsMaxGapsPerDayMaxGaps[MAX_TOTAL_SUBGROUPS];
00132 extern bool haveStudentsMaxGapsPerDay;
00134 
00135 
00137 //activities indices (in 0..gt.rules.nInternalActivities-1) for each teacher
00138 extern int teachersMaxDaysPerWeekMaxDays[MAX_TEACHERS]; //-1 for not existing
00139 extern double teachersMaxDaysPerWeekWeightPercentages[MAX_TEACHERS]; //-1 for not existing
00140 //it is practically better to use the variable below and to put it exactly like in generate.cpp,
00141 //the order of activities changes
00143 extern Matrix1D<QList<int> > teachersWithMaxDaysPerWeekForActivities;
00144 
00145 bool computeMaxDaysPerWeekForTeachers(QWidget* parent);
00147 
00148 
00150 //extern QList<int> activitiesForTeachers[MAX_TEACHERS];
00151 extern double teachersMaxGapsPerWeekPercentage[MAX_TEACHERS];
00152 extern int teachersMaxGapsPerWeekMaxGaps[MAX_TEACHERS];
00153 
00154 extern double teachersMaxGapsPerDayPercentage[MAX_TEACHERS];
00155 extern int teachersMaxGapsPerDayMaxGaps[MAX_TEACHERS];
00156 
00157 extern int nHoursPerTeacher[MAX_TEACHERS];
00158 bool computeNHoursPerTeacher(QWidget* parent);
00159 bool computeTeachersMaxGapsPerWeekPercentage(QWidget* parent);
00160 bool computeTeachersMaxGapsPerDayPercentage(QWidget* parent);
00162 
00163 
00165 extern Matrix1D<QList<int> > activitiesSameStartingTimeActivities;
00166 extern Matrix1D<QList<double> > activitiesSameStartingTimePercentages;
00167 bool computeActivitiesSameStartingTime(QWidget* parent, QHash<int, int> & reprSameStartingTime, QHash<int, QSet<int> > & reprSameActivitiesSet);
00169 
00170 
00172 extern Matrix1D<QList<int> > activitiesSameStartingHourActivities;
00173 extern Matrix1D<QList<double> > activitiesSameStartingHourPercentages;
00174 void computeActivitiesSameStartingHour();
00176 
00177 
00179 extern Matrix1D<QList<int> > activitiesSameStartingDayActivities;
00180 extern Matrix1D<QList<double> > activitiesSameStartingDayPercentages;
00181 void computeActivitiesSameStartingDay();
00183 
00184 
00186 extern Matrix1D<QList<int> > activitiesNotOverlappingActivities;
00187 extern Matrix1D<QList<double> > activitiesNotOverlappingPercentages;
00188 void computeActivitiesNotOverlapping();
00190 
00191 
00193 //extern int teachersGapsPerDay[MAX_TEACHERS][MAX_DAYS_PER_WEEK];
00194 //extern int teachersNHoursPerDay[MAX_TEACHERS][MAX_DAYS_PER_WEEK];
00195 
00196 extern double teachersMaxHoursDailyPercentages1[MAX_TEACHERS];
00197 extern int teachersMaxHoursDailyMaxHours1[MAX_TEACHERS];
00198 //extern int teachersRealGapsPerDay1[MAX_TEACHERS][MAX_DAYS_PER_WEEK];
00199 
00200 extern double teachersMaxHoursDailyPercentages2[MAX_TEACHERS];
00201 extern int teachersMaxHoursDailyMaxHours2[MAX_TEACHERS];
00202 //extern int teachersRealGapsPerDay2[MAX_TEACHERS][MAX_DAYS_PER_WEEK];
00203 
00204 bool computeTeachersMaxHoursDaily(QWidget* parent);
00206 
00207 
00209 extern double teachersMaxHoursContinuouslyPercentages1[MAX_TEACHERS];
00210 extern int teachersMaxHoursContinuouslyMaxHours1[MAX_TEACHERS];
00211 
00212 extern double teachersMaxHoursContinuouslyPercentages2[MAX_TEACHERS];
00213 extern int teachersMaxHoursContinuouslyMaxHours2[MAX_TEACHERS];
00214 
00215 bool computeTeachersMaxHoursContinuously(QWidget* parent);
00217 
00218 
00220 extern bool haveTeachersActivityTagMaxHoursDaily;
00221 
00222 extern Matrix1D<QList<int> > teachersActivityTagMaxHoursDailyMaxHours;
00223 extern Matrix1D<QList<int> > teachersActivityTagMaxHoursDailyActivityTag;
00224 extern Matrix1D<QList<double> > teachersActivityTagMaxHoursDailyPercentage;
00225 //(formerly arrays of size MAX_TEACHERS)
00226 
00227 bool computeTeachersActivityTagMaxHoursDaily(QWidget* parent);
00229 
00230 
00232 extern bool haveTeachersActivityTagMaxHoursContinuously;
00233 
00234 extern Matrix1D<QList<int> > teachersActivityTagMaxHoursContinuouslyMaxHours;
00235 extern Matrix1D<QList<int> > teachersActivityTagMaxHoursContinuouslyActivityTag;
00236 extern Matrix1D<QList<double> > teachersActivityTagMaxHoursContinuouslyPercentage;
00237 //(formerly arrays of size MAX_TEACHERS)
00238 
00239 bool computeTeachersActivityTagMaxHoursContinuously(QWidget* parent);
00241 
00242 
00244 extern double teachersMinHoursDailyPercentages[MAX_TEACHERS];
00245 extern int teachersMinHoursDailyMinHours[MAX_TEACHERS];
00246 
00247 bool computeTeachersMinHoursDaily(QWidget* parent);
00249 
00250 
00252 extern double teachersMinDaysPerWeekPercentages[MAX_TEACHERS];
00253 extern int teachersMinDaysPerWeekMinDays[MAX_TEACHERS];
00254 
00255 bool computeTeachersMinDaysPerWeek(QWidget* parent);
00257 
00258 
00260 extern double subgroupsMaxHoursDailyPercentages1[MAX_TOTAL_SUBGROUPS];
00261 extern int subgroupsMaxHoursDailyMaxHours1[MAX_TOTAL_SUBGROUPS];
00262 
00263 extern double subgroupsMaxHoursDailyPercentages2[MAX_TOTAL_SUBGROUPS];
00264 extern int subgroupsMaxHoursDailyMaxHours2[MAX_TOTAL_SUBGROUPS];
00265 
00266 bool computeSubgroupsMaxHoursDaily(QWidget* parent);
00268 
00269 
00271 extern double subgroupsMaxHoursContinuouslyPercentages1[MAX_TOTAL_SUBGROUPS];
00272 extern int subgroupsMaxHoursContinuouslyMaxHours1[MAX_TOTAL_SUBGROUPS];
00273 
00274 extern double subgroupsMaxHoursContinuouslyPercentages2[MAX_TOTAL_SUBGROUPS];
00275 extern int subgroupsMaxHoursContinuouslyMaxHours2[MAX_TOTAL_SUBGROUPS];
00276 
00277 bool computeStudentsMaxHoursContinuously(QWidget* parent);
00279 
00280 
00282 extern bool haveStudentsActivityTagMaxHoursDaily;
00283 
00284 extern Matrix1D<QList<int> > subgroupsActivityTagMaxHoursDailyMaxHours;
00285 extern Matrix1D<QList<int> > subgroupsActivityTagMaxHoursDailyActivityTag;
00286 extern Matrix1D<QList<double> > subgroupsActivityTagMaxHoursDailyPercentage;
00287 //(formerly arrays of size MAX_TOTAL_SUBGROUPS)
00288 
00289 bool computeStudentsActivityTagMaxHoursDaily(QWidget* parent);
00291 
00292 
00294 extern bool haveStudentsActivityTagMaxHoursContinuously;
00295 
00296 extern Matrix1D<QList<int> > subgroupsActivityTagMaxHoursContinuouslyMaxHours;
00297 extern Matrix1D<QList<int> > subgroupsActivityTagMaxHoursContinuouslyActivityTag;
00298 extern Matrix1D<QList<double> > subgroupsActivityTagMaxHoursContinuouslyPercentage;
00299 //(formerly arrays of size MAX_TOTAL_SUBGROUPS)
00300 
00301 bool computeStudentsActivityTagMaxHoursContinuously(QWidget* parent);
00303 
00304 
00306 extern double subgroupsMinHoursDailyPercentages[MAX_TOTAL_SUBGROUPS];
00307 extern int subgroupsMinHoursDailyMinHours[MAX_TOTAL_SUBGROUPS];
00308 extern bool subgroupsMinHoursDailyAllowEmptyDays[MAX_TOTAL_SUBGROUPS];
00309 bool computeSubgroupsMinHoursDaily(QWidget* parent);
00311 
00312 
00314 //index represents the first activity, value in array represents the second activity
00315 extern Matrix1D<QList<double> > constrTwoActivitiesConsecutivePercentages;
00316 extern Matrix1D<QList<int> > constrTwoActivitiesConsecutiveActivities;
00317 void computeConstrTwoActivitiesConsecutive();
00318 
00319 //index represents the second activity, value in array represents the first activity
00320 extern Matrix1D<QList<double> > inverseConstrTwoActivitiesConsecutivePercentages;
00321 extern Matrix1D<QList<int> > inverseConstrTwoActivitiesConsecutiveActivities;
00323 
00324 
00326 //index represents the first activity, value in array represents the second activity
00327 extern Matrix1D<QList<double> > constrTwoActivitiesGroupedPercentages;
00328 extern Matrix1D<QList<int> > constrTwoActivitiesGroupedActivities;
00329 void computeConstrTwoActivitiesGrouped();
00330 
00331 
00333 //index represents the first activity, value in array represents the second and third activities
00334 extern Matrix1D<QList<double> > constrThreeActivitiesGroupedPercentages;
00335 extern Matrix1D<QList<QPair<int, int> > > constrThreeActivitiesGroupedActivities;
00336 void computeConstrThreeActivitiesGrouped();
00337 
00338 
00340 //index represents the first activity, value in array represents the second activity
00341 extern Matrix1D<QList<double> > constrTwoActivitiesOrderedPercentages;
00342 extern Matrix1D<QList<int> > constrTwoActivitiesOrderedActivities;
00343 void computeConstrTwoActivitiesOrdered();
00344 
00345 //index represents the second activity, value in array represents the first activity
00346 extern Matrix1D<QList<double> > inverseConstrTwoActivitiesOrderedPercentages;
00347 extern Matrix1D<QList<int> > inverseConstrTwoActivitiesOrderedActivities;
00349 
00350 
00352 extern double activityEndsStudentsDayPercentages[MAX_ACTIVITIES]; //-1 for not existing
00353 bool computeActivityEndsStudentsDayPercentages(QWidget* parent);
00354 extern bool haveActivityEndsStudentsDay;
00356 
00357 
00358 bool checkMinDays100Percent(QWidget* parent);
00359 bool checkMinDaysConsecutiveIfSameDay(QWidget* parent);
00360 
00361 
00363 extern double teachersIntervalMaxDaysPerWeekPercentages1[MAX_TEACHERS];
00364 extern int teachersIntervalMaxDaysPerWeekMaxDays1[MAX_TEACHERS];
00365 extern int teachersIntervalMaxDaysPerWeekIntervalStart1[MAX_TEACHERS];
00366 extern int teachersIntervalMaxDaysPerWeekIntervalEnd1[MAX_TEACHERS];
00367 
00368 extern double teachersIntervalMaxDaysPerWeekPercentages2[MAX_TEACHERS];
00369 extern int teachersIntervalMaxDaysPerWeekMaxDays2[MAX_TEACHERS];
00370 extern int teachersIntervalMaxDaysPerWeekIntervalStart2[MAX_TEACHERS];
00371 extern int teachersIntervalMaxDaysPerWeekIntervalEnd2[MAX_TEACHERS];
00372 
00373 extern double teachersIntervalMaxDaysPerWeekPercentages3[MAX_TEACHERS];
00374 extern int teachersIntervalMaxDaysPerWeekMaxDays3[MAX_TEACHERS];
00375 extern int teachersIntervalMaxDaysPerWeekIntervalStart3[MAX_TEACHERS];
00376 extern int teachersIntervalMaxDaysPerWeekIntervalEnd3[MAX_TEACHERS];
00377 
00378 bool computeTeachersIntervalMaxDaysPerWeek(QWidget* parent);
00380 
00381 
00383 extern double subgroupsIntervalMaxDaysPerWeekPercentages1[MAX_TOTAL_SUBGROUPS];
00384 extern int subgroupsIntervalMaxDaysPerWeekMaxDays1[MAX_TOTAL_SUBGROUPS];
00385 extern int subgroupsIntervalMaxDaysPerWeekIntervalStart1[MAX_TOTAL_SUBGROUPS];
00386 extern int subgroupsIntervalMaxDaysPerWeekIntervalEnd1[MAX_TOTAL_SUBGROUPS];
00387 
00388 extern double subgroupsIntervalMaxDaysPerWeekPercentages2[MAX_TOTAL_SUBGROUPS];
00389 extern int subgroupsIntervalMaxDaysPerWeekMaxDays2[MAX_TOTAL_SUBGROUPS];
00390 extern int subgroupsIntervalMaxDaysPerWeekIntervalStart2[MAX_TOTAL_SUBGROUPS];
00391 extern int subgroupsIntervalMaxDaysPerWeekIntervalEnd2[MAX_TOTAL_SUBGROUPS];
00392 
00393 extern double subgroupsIntervalMaxDaysPerWeekPercentages3[MAX_TOTAL_SUBGROUPS];
00394 extern int subgroupsIntervalMaxDaysPerWeekMaxDays3[MAX_TOTAL_SUBGROUPS];
00395 extern int subgroupsIntervalMaxDaysPerWeekIntervalStart3[MAX_TOTAL_SUBGROUPS];
00396 extern int subgroupsIntervalMaxDaysPerWeekIntervalEnd3[MAX_TOTAL_SUBGROUPS];
00397 
00398 bool computeSubgroupsIntervalMaxDaysPerWeek(QWidget* parent);
00400 
00401 
00403 bool computeBasicSpace(QWidget* parent);
00404 
00405 //extern double notAllowedRoomTimePercentages[MAX_ROOMS][MAX_HOURS_PER_WEEK]; //-1 for available
00406 extern Matrix2D<double> notAllowedRoomTimePercentages; //-1 for available
00407 bool computeNotAllowedRoomTimePercentages();
00408 
00409 class PreferredRoomsItem{
00410 public:
00411        double percentage;
00412        QSet<int> preferredRooms;
00413 };
00414 
00415 extern Matrix1D<QList<PreferredRoomsItem> > activitiesPreferredRoomsList;
00416 extern bool unspecifiedPreferredRoom[MAX_ACTIVITIES];
00417 
00418 extern Matrix1D<QList<int> > activitiesHomeRoomsHomeRooms;
00419 extern double activitiesHomeRoomsPercentage[MAX_ACTIVITIES];
00420 extern bool unspecifiedHomeRoom[MAX_ACTIVITIES];
00421 
00422 bool computeActivitiesRoomsPreferences(QWidget* parent);
00424 
00425 
00427 extern double maxBuildingChangesPerDayForStudentsPercentages[MAX_TOTAL_SUBGROUPS];
00428 extern int maxBuildingChangesPerDayForStudentsMaxChanges[MAX_TOTAL_SUBGROUPS];
00429 bool computeMaxBuildingChangesPerDayForStudents(QWidget* parent);
00430 
00431 extern double minGapsBetweenBuildingChangesForStudentsPercentages[MAX_TOTAL_SUBGROUPS];
00432 extern int minGapsBetweenBuildingChangesForStudentsMinGaps[MAX_TOTAL_SUBGROUPS];
00433 bool computeMinGapsBetweenBuildingChangesForStudents(QWidget* parent);
00434 
00435 extern double maxBuildingChangesPerDayForTeachersPercentages[MAX_TEACHERS];
00436 extern int maxBuildingChangesPerDayForTeachersMaxChanges[MAX_TEACHERS];
00437 bool computeMaxBuildingChangesPerDayForTeachers(QWidget* parent);
00438 
00439 extern double minGapsBetweenBuildingChangesForTeachersPercentages[MAX_TEACHERS];
00440 extern int minGapsBetweenBuildingChangesForTeachersMinGaps[MAX_TEACHERS];
00441 bool computeMinGapsBetweenBuildingChangesForTeachers(QWidget* parent);
00442 
00443 extern double maxBuildingChangesPerWeekForStudentsPercentages[MAX_TOTAL_SUBGROUPS];
00444 extern int maxBuildingChangesPerWeekForStudentsMaxChanges[MAX_TOTAL_SUBGROUPS];
00445 bool computeMaxBuildingChangesPerWeekForStudents(QWidget* parent);
00446 
00447 extern double maxBuildingChangesPerWeekForTeachersPercentages[MAX_TEACHERS];
00448 extern int maxBuildingChangesPerWeekForTeachersMaxChanges[MAX_TEACHERS];
00449 bool computeMaxBuildingChangesPerWeekForTeachers(QWidget* parent);
00451 
00452 
00453 extern Matrix1D<QList<int> > mustComputeTimetableSubgroups;
00454 extern Matrix1D<QList<int> > mustComputeTimetableTeachers;
00455 extern bool mustComputeTimetableSubgroup[MAX_TOTAL_SUBGROUPS];
00456 extern bool mustComputeTimetableTeacher[MAX_TEACHERS];
00457 
00458 void computeMustComputeTimetableSubgroups();
00459 void computeMustComputeTimetableTeachers();
00460 
00461 
00462 bool homeRoomsAreOk(QWidget* parent);
00463 
00464 
00465 //2011-09-25 - Constraint activities occupy max time slots from selection
00466 
00467 class ActivitiesOccupyMaxTimeSlotsFromSelection_item
00468 {
00469 public:
00470        //double weight; -> must be 100.0%
00471        QList<int> activitiesList;
00472        QSet<int> activitiesSet;
00473        QList<int> selectedTimeSlotsList;
00474        QSet<int> selectedTimeSlotsSet;
00475        int maxOccupiedTimeSlots;
00476 };
00477 
00478 extern QList<ActivitiesOccupyMaxTimeSlotsFromSelection_item> aomtsList;
00479 extern Matrix1D<QList<ActivitiesOccupyMaxTimeSlotsFromSelection_item*> > aomtsListForActivity;
00480 
00481 bool computeActivitiesOccupyMaxTimeSlotsFromSelection(QWidget* parent);
00482 
00483 //2011-09-30 - Constraint activities max simultaneous in selected time slots
00484 
00485 class ActivitiesMaxSimultaneousInSelectedTimeSlots_item
00486 {
00487 public:
00488        //double weight; -> must be 100.0%
00489        QList<int> activitiesList;
00490        QSet<int> activitiesSet;
00491        QList<int> selectedTimeSlotsList;
00492        QSet<int> selectedTimeSlotsSet;
00493        int maxSimultaneous;
00494 };
00495 
00496 extern QList<ActivitiesMaxSimultaneousInSelectedTimeSlots_item> amsistsList;
00497 extern Matrix1D<QList<ActivitiesMaxSimultaneousInSelectedTimeSlots_item*> > amsistsListForActivity;
00498 
00499 bool computeActivitiesMaxSimultaneousInSelectedTimeSlots(QWidget* parent);
00500 
00501 extern bool haveActivitiesOccupyOrSimultaneousConstraints;
00502 
00503 //2012-04-29 - Constraint activities occupy max different rooms
00504 
00505 class ActivitiesOccupyMaxDifferentRooms_item
00506 {
00507 public:
00508        //double weight; -> must be 100.0%
00509        QList<int> activitiesList;
00510        QSet<int> activitiesSet;
00511        int maxDifferentRooms;
00512 };
00513 
00514 extern QList<ActivitiesOccupyMaxDifferentRooms_item> aomdrList;
00515 extern Matrix1D<QList<ActivitiesOccupyMaxDifferentRooms_item*> > aomdrListForActivity;
00516 
00517 bool computeActivitiesOccupyMaxDifferentRooms(QWidget* parent);
00518 
00520 
00521 extern bool fixedTimeActivity[MAX_ACTIVITIES];
00522 extern bool fixedSpaceActivity[MAX_ACTIVITIES];
00523 bool computeFixedActivities(QWidget* parent);
00524 
00525 class GeneratePreTranslate: public QObject{
00526        Q_OBJECT
00527 };
00528 
00529 
00530 #endif