Wednesday, January 21, 2009

Cplex barrier results

With some simulated data for the problem described in this post, we achieved some very good results with the Cplex barrier method. Below are timings in seconds with different Cplex algorithms


rows/cols/nzdualprimalbarrier
model 11e5/2e5/1.4e612478578.7
model 21.1e5/2.1e5/6.1e519512237.3



The GAMS models look like:
41  variable z,a1(j),a2(j),s1(i),s2(i),y(k);
42 positive variable s1,s2;
43 equation obj,e1(i),e2(k),e3(i);
44
45 option lp=cplex;
46 option iterlim=1000000;
47 option reslim=10000;
48
49 obj.. z =e= sum(i, s1(i)+s2(i));
50 e1(i).. sum(j, xx(i,j)*a1(j)) + s1(i) - s2(i) =e= b(i);
51 model m1 /obj,e1/;
52 solve m1 minimizing z using lp;
53
54 e2(k).. y(k) =e= sum(j, x(k,j)*a2(j));
55 e3(i).. sum(map(i,k), y(k)) + s1(i) - s2(i) =e= b(i);
56 model m2 /obj,e2,e3/;
57 *solve m2 minimizing z using lp;


Note that the SUM in line 55 is actually not a real summation. It just selects a k belonging to a particular i. A different, maybe better, way to write this would be:

equation e3(i,k);
e3(map(i,k)).. y(k) + s1(i) - s2(i) =e= b(i);

No comments:

Post a Comment