My friend and colleague, Rob Pratt, sent me this PROC OPTMODEL code that performs the same optimizations but uses the COFOR statement in PROC OPTMODEL to solve the problems in parallel on multiple threads. Very nice!

proc optmodel printlevel=0;
set OBS;
num a {OBS};
num b {OBS};
read data Params into OBS=[_N_] a b;
num a_this, b_this;

var X {1..2};
max Z = 1 - (X[1]-a_this)^2 - (X[2]-b_this)^2 + exp(-0.5*(X[1]^2 + X[2]^2));

num obj {OBS};
str solstatus {OBS};
num Xsol {OBS, 1..2};
cofor {i in OBS} do;
a_this = a[i];
b_this = b[i];
put a_this= b_this=;
solve;
obj[i] = _OBJ_;
solstatus[i] = _solution_status_;
for {j in 1..2} Xsol[i,j] = X[j];
end;

print a b obj solstatus Xsol;
quit;