See the answer at https://discuss.ampl.com/t/fix-command-on-binary-variables/360/2 in the new AMPL Forum.