Question: CVRP Stochastics Demands

Hello,

I got problem how to rewrite formula in maple, I have tried so many times but it is not working.

How to rewrite sum of double sum like this formula (4th constraints in the following picture)

H := numelems(N); for k from 2 to H do for i to k-1 do cons[k] := add(x[i, k], i = N)+add(x[k, j], N) = 2 end do end do;
                             H := 5
Error, invalid input: add received {1, 2, 3, 4, 5}, which is not valid for its 2nd argument, i

 

Please Wait...