1 /***************************************************************************
2                           helponimperfectconstraints.cpp  -  description
3                              -------------------
4     begin                : 2009
5     copyright            : (C) 2009 by Lalescu Liviu
6     email                : Please see https://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software: you can redistribute it and/or modify  *
12  *   it under the terms of the GNU Affero General Public License as        *
13  *   published by the Free Software Foundation, either version 3 of the    *
14  *   License, or (at your option) any later version.                       *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #include "helponimperfectconstraints.h"
19 
20 #include "longtextmessagebox.h"
21 
22 #include <QApplication>
23 
help(QWidget * parent,bool activityTagMinHoursDaily)24 void HelpOnImperfectConstraints::help(QWidget* parent, bool activityTagMinHoursDaily)
25 {
26 	QString s=tr("Important information about imperfect constraints:");
27 
28 	s+="\n\n";
29 
30 	s+=tr("The imperfect constraints are these: students (set) max gaps per day, students (set) / teacher(s) max gaps per real day,"
31 	 " teacher(s) or students (set) activity tag max/min hours daily / real days, and students (set) / teacher(s) max gaps per week for real days"
32 	 " (depending on the chosen mode).");
33 
34 	s+="\n\n";
35 
36 	s+=tr("You are advised to leave the imperfect constraints as a last resort if you really need them. Generate the timetable with all other constraints"
37 	 " and only after that you may try them. The imperfect constraints may make your timetable too hard to find or even impossible, in some conditions.");
38 
39 	s+="\n\n";
40 
41 	s+=tr("Notation: ATS = affected teacher or students set - the teacher or students specified in an imperfect constraint.");
42 
43 	s+="\n\n";
44 
45 	s+=tr("Students max gaps per day: it is not fully optimized for use with other constraints for students: min/max hours daily. It is also not tested thoroughly.");
46 
47 	s+="\n\n";
48 
49 	s+=tr("Students (set) / teacher(s) max gaps per week for real days (available depending on the mode): it is not fully optimized for use with other constraints for students/teachers:"
50 	 " max hours daily (for a real day). It is also not tested thoroughly. These 4 constraints were introduced on 30 July 2020. They represent the total sum of gaps allowed"
51 	 " over the whole week, where the gaps are computed for each complete real day (morning+afternoon).");
52 
53 	s+="\n\n";
54 	s+=tr("Activity tag max/min hours daily: it is not fully optimized for this situation: if the ATS have max gaps constraints and the number of total available slots per week"
55 	 " for the ATS is much larger than the working hours per week and the ATS has many activities with the specified activity tag (more than 0.5-0.75 of total hours)"
56 	 ". In such cases, a remedy may be to add constraint ATS max/min hours daily (without specifying an activity tag).", "ATS means affected teacher or students set.");
57 
58 	s+="\n\n";
59 	s+=tr("Read FAQ question 1/25 September 2009 for some more details about activity tag max/min hours daily constraint.");
60 
61 	if(activityTagMinHoursDaily){
62 		s+="\n\n";
63 		s+=tr("IMPORTANT NOTE: If you need a solution without empty days or if a solution with empty days does not exist, please leave the option 'Allow"
64 		 " empty days' unselected, because the generation is more efficient this way.");
65 	}
66 
67 	LongTextMessageBox::largeInformation(parent, tr("FET information"), s);
68 }
69