Hi,
I'm going to divide 6 into 5 non-negative integers that are less than or equal to 2.
Forexample, 6=0+0+1+2+3 ,1+2+3+0+0 ,6=2+2+2+0+0, 6=1+2+2+1+0 and so on.
How can I get all possible answer by gams?
gams beginner
Re: gams beginner
Hi
You can find here partitioning algorithms in several other programming languages. Up to you to try to implement it in Gams
https://stackoverflow.com/questions/400 ... f-a-number
Cheers
Renger
You can find here partitioning algorithms in several other programming languages. Up to you to try to implement it in Gams
https://stackoverflow.com/questions/400 ... f-a-number
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist