option solver ipopt;
#option send_ statuses 0;
reset;
model divergence.mod;
data divergence.dat;
solve;
#option omit_zero_rows 1;
#option problem_print_level (4);


display N, D, X > n_opt.dat; 
#display{i in I}: ny[i] > n_opt.dat;
#display{i in I}: Pz[i] > n_opt.dat;


print "Result of the optimization procedure:" > n_opt.dat;

display n > n_opt.dat; 

#display {i in I}: ny[i]+ sum{k in I: k != i} n[k,i] - sum{k in I: k != i } n[i,k] > n_opt.dat;

#display sum{i in I, j in I : i!= j} n[i,j]* abs(i - j) > n_opt.dat;

display divergence > n_opt.dat;

display sum{i in I, j in I : i!= j} n[i,j]* abs(i - j) > n_opt.dat;
