Modeling the effect of mandatory district compactness on partisan gerrymanders