Search found 5 matches
- 3 years ago
- Forum: Modeling
- Topic: Generating All Combinations
- Replies: 2
- Views: 2050
Re: Generating All Combinations
Thank you. Works perfectly. GAMS does not do matrices so well, but working with subsets will get you there. We use embedded Python to do the actual calculation of the combinations: set n / 1*13 /; scalar r /4/; * Calculate n Choose r $eval nCr fact(card(n))/fact(r)/fact(card(n)-r) $eval r r set p 'p...
- 3 years ago
- Forum: Syntax
- Topic: Error Using ParallelMode
- Replies: 2
- Views: 14671
Re: Error Using ParallelMode
Thank you very much Renger! That worked perfectly! Hi Gams does not recognize the option parallelmode as it is solver specific and should be put in an option file. For example, you could add this to your code $echo parallelmode -1 > cplex.opt $echo threads = 8 >>cplex.opt mymodel.optfile=1; where &q...
- 3 years ago
- Forum: Modeling
- Topic: Generating All Combinations
- Replies: 2
- Views: 2050
Generating All Combinations
Hello,
I have a column consisting of 13 rows of ones and zeros. I would like to generate all combinations where I have N 1s in the column (where N < 13). What is the fastest way to do that?
Thank you!
I have a column consisting of 13 rows of ones and zeros. I would like to generate all combinations where I have N 1s in the column (where N < 13). What is the fastest way to do that?
Thank you!
- 3 years ago
- Forum: Syntax
- Topic: Error Using ParallelMode
- Replies: 2
- Views: 14671
Error Using ParallelMode
Dear All, I am solving a relatively large MIP using GAMS/CPLEX. To harness the power of the CPUs on my computer while trying to using the opportunistic mode, I inserted the two following lines of code before by solve statement Option threads = 8; Option ParallelMode = -1; But I am getting a syntax e...
- 3 years ago
- Forum: Tools
- Topic: Building my own PC
- Replies: 0
- Views: 2455
Building my own PC
Hello, I am currently thinking of building my own PC mostly to solve MIPs using CPLEX/GAMS for research. Currently the specs I have listed include the processor "AMD Ryzen 3960X" and 128 GB RAM. The processor has 24 cores. I was wondering which would present the bottleneck, the 24 cores or...