# Matching Ordering Is Not Always Easy

In some circumstances, you might want to build an optimization model containing two sets of variables, say and , and constrain them so that the sort order of each matches. That condition is easily expressed in logical terms: if and only if for all pairs with . Translating that into a mathematical programming model that …