If I have integer variables v1 ... vn and I want to compute the
partial sums:
s1 = v1
s2 = v1 + v2
s3 = v1 + v2 + v3
...
sn = v1 + ... + vn
What is the best way to express the constraints? As above (using
linear() constraints) or as:
si = si-1 + vi
Or is there another, better way? Or does it not make any difference?
Malcolm
--
"Progress should mean that we are always changing the world to fit
the vision, instead we are always changing the vision."
- G.K.Chesterton, Orthodoxy
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users