Keg,
What are are asking for is very very complicated. I have look at this in the past its a field in itself.
The QF system is actually sold either by QF or the Preston Group to other airlines. There is a european system, and then there is the the well known US system that is used by
VB (Sabre).
I have seen a paper on the QF system, quite impressive on the level of optimisation it gies into, and the number of constraints it handles. Dont remember seeing a common sense constraint.
Z