A model of party constraints on optimal candidate positions