clear all;
evalc('run /usr/local/bin/amplapi/matlab/setUp.m');
ampl_base = AMPL;
ampl_base.read('model.mod');
ampl_base.setOption('solver', 'cplex');

% Works with a "for" loop but not with a "parfor" loop
parfor i = 1:1:10
    ampl = ampl_base;
    ampl.solve;
end
