user11629: In connection with the Hou Yifan incident in Gibraltar I read that when doing the pairings they avoided matches between players from Iran and Israel (for whatever reason...). 
How is this technically done in a Swiss pairing system? Is there an option in the pairing program to set this? Algorithmically, is it done in such a way that these matches are considered played already (through some flag "playedAgainstEachOther=true") or in some other way?

user4418: 
Is there an option in the pairing program to set this?

Of course.
Different approved Swiss pairing programs will do this is different ways. You should check out the User Manuals for the different programs to see how this is done.
For instance, in the Vega program go to the File menu, Round Manager, Avoid Pairs option and you can specify groups of players who should not be paired against each other for certain rounds. Generally speaking this should not be done in the last round where one of the players is on more than 50% even in the case of Iranian v Israeli since this can affect prizes and important placings.

Algorithmically, is it done in such a way that these matches are
  considered played already (through some flag
  "playedAgainstEachOther=true") or in some other way?

This is a programming question rather than a chess question and does not belong here.

11629: <p>In connection with the Hou Yifan incident in Gibraltar I read that when doing the pairings they avoided matches between players from Iran and Israel (for whatever reason...). </p>

<p>How is this technically done in a Swiss pairing system? Is there an option in the pairing program to set this? Algorithmically, is it done in such a way that these matches are considered played already (through some flag "playedAgainstEachOther=true") or in some other way?</p>
 4418: <blockquote>
  <p>Is there an option in the pairing program to set this?</p>
</blockquote>

<p>Of course.</p>

<p>Different approved Swiss pairing programs will do this is different ways. You should check out the User Manuals for the different programs to see how this is done.</p>

<p>For instance, in <a href="http://www.vegachess.com/tl/tl_files/music_academy/distrib/vega_en.pdf" rel="nofollow noreferrer">the Vega program</a> go to the File menu, Round Manager, Avoid Pairs option and you can specify groups of players who should not be paired against each other for certain rounds. Generally speaking this should not be done in the last round where one of the players is on more than 50% even in the case of Iranian v Israeli since this can affect prizes and important placings.</p>

<blockquote>
  <p>Algorithmically, is it done in such a way that these matches are
  considered played already (through some flag
  "playedAgainstEachOther=true") or in some other way?</p>
</blockquote>

<p>This is a programming question rather than a chess question and does not belong here.</p>
