I'm curious how is the best way to articulate a soft, categorical constraint for MILP solvers.
In example, say that there are two sizes of t-shirts, small and large. Likewise, people have ideal t-shirt sizes, small and large. A hard constraint would enforce that everybody gets a t-shirt their size and if that's not possible, there is no solution.
Conversely, a soft constraint would enforce that everybody received a t-shirt, but it might not be their ideal size. I believe that this could be done by an objective term, rather than a constraint, by maximizing the number of people who got their ideal t-shirt size (or minimizing those who didn't.)
However, I'd like to some feedback on how I can express this categorical soft constraint in terms of variables, which a generic MILP solver would accept.