int N = 250; {int} I = asSet(1..N); float A[i in I][j in I] = (i==j)?1:0; float B[i in I][j in I] = (i==j)?1:0; //float A[i in I][j in I] = 1; //float B[i in I][j in I] = 1; float C[i in I][j in I] = sum(k in I) A[i,k]*B[k,j]; float s = sum(i in I, j in I) C[i,j]; execute{ writeln(s); } |
Model | GNU Mathprog | AMPL | GAMS | OPL |
sparse (identity) | 50 sec | 3 sec | 0.1 sec | 17 sec |
dense (all ones) | 50 sec | 3 sec | 3 sec | 17 sec |
hello there,
ReplyDeletewould you please give a bit more description what is the machine environment (maybe you gave it but I couldn't find)? on my machine the OPL stuff takes less than 10sec
thanks
cheers
jfk
My PC is somewhat old with a Quad Core Q6700 @ 2.67 Ghz. so these numbers should only be looked at in relative terms.
ReplyDelete