gams beginner

Problems with syntax of GAMS
Post Reply
YCF0913
User
User
Posts: 3
Joined: 5 months ago

gams beginner

Post by YCF0913 » 3 months ago

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?

User avatar
Renger
Posts: 126
Joined: 1 year ago

Re: gams beginner

Post by Renger » 3 months ago

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

Post Reply