Skip to main content

Function: createAssignTogetherRule()

function createAssignTogetherRule(config): CompilationRule;
Encourages or enforces that team members in the group work the same shift patterns on a day. For each pair of team members in the group, ensures they are assigned to the same shifts.

Parameters

ParameterType
config{ groupEmployeeIds: [string, string, ...string[]]; priority: "LOW" | "MEDIUM" | "HIGH" | "MANDATORY"; }
config.groupEmployeeIds[string, string, ...string[]]
config.priority"LOW" | "MEDIUM" | "HIGH" | "MANDATORY"

Returns

CompilationRule

Example

const rule = createAssignTogetherRule({
  groupEmployeeIds: ["alice", "bob", "charlie"],
  priority: "HIGH",
});
builder = new ModelBuilder({ ...config, rules: [rule] });