Taking example from minizinc tutorial 2.5.3
data and decisions can be seperated as follows:
%%%%%%%%%%%%%%%%%
enum EmpId;
type EmployeeData = record(
array[Timespan] of bool: available,
);
type EmployeeVar = record(
array[Timespan] of var Shift: shifts,
);
array[EmpId] of EmployeeData: employee_data;
array[EmpId] of EmployeeVar: employee_var;
%%%%%%%%%%%%%%%%%%%%%%%%%
How to achieve the case where Timespan is EmpId dependent?
something akin to,
%%%%%%%%%%%%%%%%%%%%%%%%%
type EmployeeData = record(
list of bool: available,
);
type EmployeeVar = record(
array[index_set(available)] of var Shift: shifts,
);
%%%%%%%%%%%%%%%%%%%%%%%%%%%