Skip to content

Add EverySecondWeekendFreeConstraint and remove objective implementation#239

Merged
CarryHof merged 2 commits intomainfrom
every-second-weekend-free-constraint
Jan 13, 2026
Merged

Add EverySecondWeekendFreeConstraint and remove objective implementation#239
CarryHof merged 2 commits intomainfrom
every-second-weekend-free-constraint

Conversation

@Hgamo
Copy link
Collaborator

@Hgamo Hgamo commented Jan 12, 2026

This is one way to solve the issue. It converts the objective to a hard constraint.
Hidden employees are ignored because otherwise an infeasible solution is very likely.
Note: I have observed that hidden employees now work mostly on weekends to cover the losses. This is definitely not ideal but currently the only solution I have found.

Closes #230

Copy link
Collaborator

@CarryHof CarryHof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@CarryHof CarryHof merged commit ed802d9 into main Jan 13, 2026
1 check passed
@Hgamo Hgamo deleted the every-second-weekend-free-constraint branch January 14, 2026 09:45
Hgamo added a commit that referenced this pull request Jan 14, 2026
* Refactor rotation logic (#238)

* Add EverySecondWeekendFreeConstraint and remove objective implementation (#239)

* Add EverySecondWeekendFreeConstraint and remove objective implementation

* Remove EverySecondWeekendFreeObjective from constraints and test cases

* Refactor MaximizeEmployeeWishesObjective (#240)

Refactor MaximizeEmployeeWishesObjective to simplify penalty handling by directly appending variables and removing unnecessary penalty variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Every Second Weekend Free must have a high (maybe even the highest) priority

2 participants