****************************************************************************************************
****************************************************************************************************
var x{i in 1..3} >= 0;
param res {i in 1..6};
param p1 {iter in 1..2};Â Â param p2 {iter in 1..2};
param iter;
minimize obj:
  p1[iter] - x[1]^2 - 2*x[2]^2 - x[3]^2 - x[1]*x[2] - x[1]*x[3];
subject to c1:
  8*x[1] + 14*x[2] + 7*x[3] - p2[iter] = 0;
subject to c2:
  x[1]^2 + x[2]^2 + x[3]^2 -25 >= 0;
let p1[1] := 1000;Â Â Â let p1[2] := 500;
let p2[1] := 56;Â Â Â Â let p2[2] := 98;
option parampl_options 'solver=ipopt';
option ipopt_options 'mu_init=1e-6 max_iter=10000';
# sequential
for {i in 1..2} {
  let {k in 1..3} x[k] := 2;   # define the initial point.
  let iter := i;
  solve;
  for {j in 1..3} {       # store the solution
   let res[(i-1)*3 + j] := x[j];
  };
};
display res;
# paralallel
option parampl_queue_id 'powelltest';
for {i in 1..3} {
  # Define the initial point.
  let x[1] := 2;
  let x[2] := 2;
  let x[3] := 2;
  let iter := i;
  # execute solver (non blocking execution):
  #commands paramplsub;
write ("bparampl_problem_" & $parampl_queue_id);
  shell 'python parampl.py submit';Â
};
# the tasks are now being executed in parallel...
for {i in 1..2} {
  # retrieve solution from the solver:
  # commands paramplret;
shell 'python parampl.py retrieve';
  if shell_exitcode == 0 then {
   solution ("parampl_problem_" & $parampl_queue_id & ".sol");
   remove ("parampl_problem_" & $parampl_queue_id & ".sol");
  }
  # store the solution
  for {j in 1..3} {
    let res[(i-1)*3 + j] := x[j];
  };
};
****************************************************************************************************
****************************************************************************************************
But I have this errors:
****************************************************************************************************
****************************************************************************************************
res [*] :=
1Â 2
2Â 2
3Â 2
4Â 2
5Â 2
6Â 2
;
Traceback (most recent call last):
 File "parampl.py", line 639, in <module>
  jobNumber = parampl.submit(queueId)
 File "parampl.py", line 202, in submit
  self.renameFile(self.problemfile(queueId) + "." + PARAMPL_NL_FILE_EXT, PARAMPL_JOB_PROBLEM_FILE_PREFIX + "_" + queueId + "_" + str(jobNumber) + "." + PARAMPL_NL_FILE_EXT)
 File "parampl.py", line 497, in renameFile
  os.rename(old, new)
exit code 1
Traceback (most recent call last):
 File "parampl.py", line 639, in <module>
  jobNumber = parampl.submit(queueId)
 File "parampl.py", line 202, in submit
  self.renameFile(self.problemfile(queueId) + "." + PARAMPL_NL_FILE_EXT, PARAMPL_JOB_PROBLEM_FILE_PREFIX + "_" + queueId + "_" + str(jobNumber) + "." + PARAMPL_NL_FILE_EXT)
 File "parampl.py", line 497, in renameFile
  os.rename(old, new)
exit code 1
Error at _cmdno 51 executing "write" command
error processing objective obj:
invalid subscript p1[3]
<<< Process finished. (Exit code 2)
================ READY ================