Handle bypasses better
Closed this issue · 0 comments
ez314 commented
Bypasses should just be pre-assigned, and constraints/courses modified/replaced. The edge case is if someone wants some course to have the possibility of filling other constraints, but they don't know for sure if that's what they want long term. I think any user that wants this level of control can just assign the course manually by themselves.
Pre-assignment procedure:
- Figure out when bypasses are active. Take UNION(bypasses, constraints) to determine where hours should be assigned.
- Save these edges to be added to the returned graph.
- Copy these course and the constraints, and put them back into the original graph. Sort of like a copy-on-write.
- Subtract hours as specified by the bypasses, from both the course and the constraints
- Solve normally
- Add bypasses to maxflow-generated graph