You can probably write a basic planner in under an hour with all the constraints you can think of. You can just continue to fiddle with the constraints and weights until you are happy without having to worry about duplicates or errors.
I’ve used it to solve cost optimization problems for companies I’ve worked with and it works really well.