Here is a quite simple Constraint Programming model in MiniZinc which - given the proper solver - generates all the possible valid solutions for (my interpretation of) the problem. However, as @TimChippingtonDerrick points out, for more complex problem instances there are too many solutions.
That said, if the objective (obj = "2a + 5b") somehow can be stated in the model (e.g. using some extra data of the interviewer/applicants etc), it's just a matter of changing it to an optimization problem, i.e. minimizing or maximizing that objective.
So, here is the MiniZinc model for a simple problem instance (x=10, y=5, z=10, and m=3). Note: in the interview table, the value 0 (zero) represents that there is no interview for the interviewer at that time.
include "globals.mzn";
int: x = 10; % number of time slots
int: y = 5; % number of faculty interviewers
int: z = 10; % number of applicants interviewing
int: m = 3; % number of times each applicants will be interviewed
% decision variables
% The interview table:
% 1..y: rows (interviewers)
% 1..x: columns (time slots)
array[1..y, 1..x] of var 0..z: s;
% solve satisfy;
solve :: int_search([s[i,j] | i in 1..y, j in 1..x], first_fail, indomain_random, complete) satisfy;
constraint
% A z digit can only appear once in each row/column like Sudoku (because an applicant
% can't interview with the same interviewer twice and he/she can't interview twice at once).
forall(a in 1..z) (
% rows
forall(i in 1..y) (
%sum([bool2int(s[i,j] = a) | j in 1..x]) <= 1
alldifferent_except_0([bool2int(s[i,j] = a) | j in 1..x])
)
/\
% columns
forall(j in 1..x) (
% sum([bool2int(s[i,j] = a) | i in 1..y]) <= 1
alldifferent_except_0([bool2int(s[i,j] = a) | i in 1..y])
)
)
% There has to be exactly 3 of each z number in the entire table
% (because all applicants have to interview exactly 3 times).
/\
forall(a in 1..z) (
count([s[i,j] | i in 1..y, j in 1..x], a, m)
)
;
% constraint
% % symmetry breaking: assign applicant a to interviewer a in time a (if possible)
% forall(a in 1..z where a <= y) (
% s[a,a] = a
% )
% ;
output [
"x (number of time slots (rows): " ++ show(x) ++ "\n" ++
"y (number of interviews (columns): " ++ show(y) ++ "\n" ++
"z (number of applicants): " ++ show(z) ++ "\n"
]
++
[
if j = 1 then "\n" else " " endif ++
show_int(2,s[i,j])
| i in 1..y, j in 1..x
];
For this problem (x=10, y=5, z=10) there are a huge number of solutions. Here are two of them:
x (number of time slots (rows): 10
y (number of interviews (columns): 5
z (number of applicants): 10
5 2 10 8 0 6 7 4 3 9
3 1 5 7 0 2 9 6 8 4
8 0 0 5 6 1 10 3 0 7
2 10 1 0 0 9 0 0 0 0
0 0 0 0 0 4 0 0 0 0
----------
x (number of time slots (rows): 10
y (number of interviews (columns): 5
z (number of applicants): 10
5 2 10 8 0 6 7 4 3 9
3 1 5 7 0 2 9 6 8 4
8 0 0 5 6 1 10 3 0 7
2 10 0 1 0 9 0 0 0 0
0 0 0 0 0 4 0 0 0 0
(This MiniZinc model is also here: http://www.hakank.org/minizinc/interview_scheduling.mzn )
A numerical comment on a simpler problem (x=6,y=3,z=3, m=3) to show the multitude of the problem: There are 317760 different solutions when not using the symmetry breaking (which is commented out in the code). With the symmetry breaking it's far less solutions: 1300. Here's one of these solutions:
1 0 0 3 2 0
3 2 1 0 0 0
0 1 3 2 0 0