A second difficulty lies in the minimal number
of students necessary to open a course. This con-
straint (8) is temporarily relaxed. The second step
(line 2) consists of building a transshipment network
G = (V, A, c, w) with capacities c and weights w on
the arcs. The set of nodes V contains a source and a
sink, a node (i, h) for each student with each type of
course, a node (i, k) for each student with each period,
and the courses with their already associated periods
( j, k). The set of arcs is (source, (i, h)), ((i, h), (i, k)),
((i, k), ( j, k)), (( j, k), sink). The capacity c and weight
w functions are defined as follows:
Arcs A Capacity c Weight w
(source,(i, h)) n(i, h) 0
((i, h), (i, k)) 1 0
((i, k), ( j, k)) 1 a
ij
(( j, k), sink) 30 0
Since the capacities and the weights are all inte-
gers, this transshipment problem can be solved opti-
mally using continuous variables, as stated by the well
known integrality theorem; this problem is known un-
der the name of min cost max flow problem and is
polynomially solvable: For every network flow prob-
lem with integer data, every basic feasible solution
and, in particular, every basic optimal solution as-
signs integer flow to every arc.
Once the problem solved, if some courses do not
contain enough students, one of these is eliminated
from the set of courses. The choice of the course to be
eliminated may depend on the preferences expressed
by the students, as stated by Algorithm 1. Technically,
the elimination of a course may be done by either re-
moving the course from the network model, or by set-
ting the capacity of the course to 0. And this process
iterates until all courses have the minimal number of
students (while loop) required to be opened.
Of course, in order to get a feasible solution, prior
to running Algorithm 3, one has to check that the
number of students in each type of course (major, mi-
nor in spring, minor in autumn) is less than or equal
to the sum of the capacities.
One could also extend the model by changing
some unused arc costs or capacities. For instance,
one could take into account students preferences over
days with costs on the arcs ((i, h), ( j, k)), or even by
putting a zero capacity if a student is not available a
given day. Moreover, if a course has a cost which
is linear with the number of students (for instance if
some material has to be bought for each student), one
could put a cost, say b on each arc (( j, k), sink), ex-
pressing that each student following the course costs
an additional amount of b.
5 APPLICATION
The student assignment problem to major and mi-
nor courses was successfully applied at the Geneva
School of Business Administration. In 2011, it in-
volved 146 students, of which 98 full-time students
and 48 part-time students, 14 major courses, 10 minor
courses during the fall semester and 9 minor courses
during the spring semester. The minimum number of
students necessary to open a portfolio or a course is
15, and the capacity of each course is 30.
The generated model contains 5904 variables and
66541 constraints. It is solved optimally within a
few seconds on a Intel Core 2 Quad PC with 4 Gb
memory, using the AMPL modeling language and the
Gurobi 4.5 solver. It was therefore, with our specific
data set, not necessary to apply the heuristic described
by Algorithm 3.
6 CONCLUSIONS
In this article, we described a successful application
of operations research tools. We created a convenient
way of data collection, modelled an assignment prob-
lem as a binary problem and finally solved it using
available solvers.
Solving an NP-hard problem, or at least one
viewed as ”difficult” from a practical point of view,
requires several steps: data collection, modeling,
solving and presenting the results. It is often agreed
that the development of a specific heuristic is required
even for middle-size “difficult” problems. We learned
from our experience in the field of practical opti-
mization of “difficult” problems that before develop-
ing home-made heuristics, it makes sense to try solv-
ing the problem with available commercial or open-
source solvers.
REFERENCES
Anwar, A. A. and Bahaj, A. S. (2003). Student project allo-
cation using integer programming. IEEE Transactions
on Education, 46:359–367.
Badri, M. A., Davis, D. L., Davis, D. F., and Hollingsworth,
J. (1998). A multi-objective course scheduling model:
Combining faculty preferences for courses and times.
Computers & OR, 25(4):303–316.
Harper, P. R., de Senna, V., Vieira, I. T., and Shahani, A. K.
(2005). A genetic algorithm for the project assign-
ment problem. Computers & Operations Research,
32(5):1255 – 1265.
Hinkin, T. R. and Thompson, G. M. (2002). Schedulexpert:
Scheduling courses in the cornell university school of
hotel administration. Interfaces, 32:45–57.
CourseOpening,AssignmentandTimetablingwithStudentPreferences
9