Wednesday, September 16, 2009

Sign problem

I'm trying to follow your implemantation of Benders Decomposition for SP with GAMS (http://www.amsterdamoptimization.com/pdf/stochbenders.pdf) but after looking deeply I can not discover the reason of a "-" sign. Sorry this basic question!


I look to Eq.7 (pag. 3), and it says theta > .... (no minus sign)

And during your implementation in GAMS you program:
cutconst(iter) = cutconst(iter) - prob(s)*sum(j,(-selmax.m(j))*demand(j,s));
cutcoeff(iter,j) = cutcoeff(iter,j) - prob(s)*(-selling.m(j));

I can not discover why we should have: "-" prob(s)
I know this the right programming, but I do not understand why we need this sign.

The sign of duals is not always well defined. In this case we needed to add a minus sign to get the correct results as GAMS is using a different sign convention than the text. It would have been better if the text and the code were in sync here or at least devote a remark about this.