Skip to main content
A rule that adds constraints or objectives to the solver model. Rules implement compile to emit solver constraints during model building, and optionally validate to check the solution after solving. Use the create*Rule functions to create built-in rules.

Methods

compile(builder)

Emit constraints and objectives into the model builder.

cost(assignments, members, shiftPatterns) (optional)

Compute cost contribution for a solved schedule. Returns: CostContribution

validate(assignments, reporter, context) (optional)

Validate the solved schedule and report violations.