Here's one approach, where I have replaced the strings with pairs of numbers:
proc optmodel;
set STATIONS = /A B C D/;
/* set ORIENTATIONS = /'45/35' '90/35' '135/35' '180/35' '225/35' '270/35' '315/35' '360/35'/;*/
set ORIENTATIONS = {<45,35>, <90,35>, <135,35>, <180,35>, <225,35>, <270,35>, <315,35>, <360,35>};
var CHI {STATIONS, ORIENTATIONS} binary;
set STATION_PAIRS = {<'A','B'>, <'C','D'>};
set AZIMUTHS = setof {<a,e> in ORIENTATIONS} a;
put AZIMUTHS=;
set AZIMUTH_PAIRS = {a1 in AZIMUTHS, a2 in AZIMUTHS: mod(a1-a2+360,360) <= 45};
put AZIMUTH_PAIRS=;
con NotAdjacentAzimuths {<s1,s2> in STATION_PAIRS, <a1,a2> in AZIMUTH_PAIRS}:
sum {<a,e> in ORIENTATIONS: a in {a1,a2}} (CHI[s1,a,e] + CHI[s2,a,e]) <= 1;
expand;
quit;
Note that this "clique" constraint subsumes the "conflict" constraint (from my answer to your previous question) that prevents identical azimuths from being assigned to both stations in a pair.
... View more