对于我的论文,我正在制作一个简单的时间表模型。下面可以找到一小部分代码。该模型旨在根据时间 t 所需的工作量将一组专业工人连接到一个班次。目前,这只是一个纯粹的满意度问题。
模型:
enum employees; % all employees
set of employees: runnersPrimary; % runners employees
array[positions] of float: positionsRatio; % 50% of workload should be runners
% General labels
enum positions = {bar, runner, kitchen, free};
set of employees: emergencyResponseOfficer;
% Contract hours
array[employees] of int: contractHours;
% Workload requested
set of int: shiftLength = 1..(7*24); % one week schedule, scheduled per hour
array[shiftLength] of int: workload;
% Settings
int: minShiftLength = 3;
int: maxShiftLength = 8;
% Target …Run Code Online (Sandbox Code Playgroud)