Hi,

Currently I'm working on a larger power system having 500 nodes, 599 lines and 90 generator. My objecting is to minimize cost and line loss using Semi Definite Programming. The problem is when I ran the model it takes a lot of time and at the end the operation terminates saying that insufficient memory.

Can anyone please tell me how big of a system can be solved using GAMS?

Thank you.

## GAMS for larger systems.

### Re: GAMS for larger systems.

You have to distinguish between what models can GAMS

-Michael

*generate*and what models can be*solved*by the integrated GAMS solvers. From your description it is unclear in what part you ran out of memory. If you post your log that will give us a better idea. BTW, the only SDP solver available in GAMS is MOSEK. GAMS also has a so so link to csdp. Moreover, the size of your problem inputs don't clearly translate in to size of the generated model. Here one usually talks about number of variables, constraints, and non-zeros. While there is currently a limit of 2.1e9 non-zeros in GAMS (and many solvers) this is often not practical limit since the solver stop working way way before this. As an example, we just generated a very large LP with ~250e6 column and ~225e6 rows with about ~700e6 non-zeros. So*generation*of a model should not be a problem, solving is a different matter.-Michael

### Re: GAMS for larger systems.

Thank you for your reply sir. Here's the log that you asked for:

--- Starting compilation

--- trial_1.gms(64) 3 Mb

--- .ReYbus_mat.csv(501) 3 Mb

--- trial_1.gms(70) 3 Mb

--- .ImYbus_mat.csv(501) 3 Mb

--- trial_1.gms(76) 3 Mb

--- .ReYf_mat.csv(600) 3 Mb

--- trial_1.gms(82) 3 Mb

--- .ImYf_mat.csv(600) 3 Mb

--- trial_1.gms(96) 3 Mb

--- .fbus_mat.csv(600) 3 Mb

--- trial_1.gms(106) 3 Mb

--- .tbus_mat.csv(600) 4 Mb

--- trial_1.gms(116) 4 Mb

--- .gd_mat.csv(501) 4 Mb

--- trial_1.gms(469) 4 Mb

--- Starting execution: elapsed 0:00:00.156

--- trial_1.gms(4364) 87 Mb

--- Generating QCP model mahdi

--- trial_1.gms(4321) 28353 Mb

*** Out of Memory in New or GetMem.

*** Out of Memory while executing line 4321

*** HeapLimit = 1E20 MB HeapSize = 28361.1 MB

--- Job trial_1.gms Stop 03/11/19 17:20:52 elapsed 1:12:24.161

Exit code = 10

--- Starting compilation

--- trial_1.gms(64) 3 Mb

--- .ReYbus_mat.csv(501) 3 Mb

--- trial_1.gms(70) 3 Mb

--- .ImYbus_mat.csv(501) 3 Mb

--- trial_1.gms(76) 3 Mb

--- .ReYf_mat.csv(600) 3 Mb

--- trial_1.gms(82) 3 Mb

--- .ImYf_mat.csv(600) 3 Mb

--- trial_1.gms(96) 3 Mb

--- .fbus_mat.csv(600) 3 Mb

--- trial_1.gms(106) 3 Mb

--- .tbus_mat.csv(600) 4 Mb

--- trial_1.gms(116) 4 Mb

--- .gd_mat.csv(501) 4 Mb

--- trial_1.gms(469) 4 Mb

--- Starting execution: elapsed 0:00:00.156

--- trial_1.gms(4364) 87 Mb

--- Generating QCP model mahdi

--- trial_1.gms(4321) 28353 Mb

*** Out of Memory in New or GetMem.

*** Out of Memory while executing line 4321

*** HeapLimit = 1E20 MB HeapSize = 28361.1 MB

--- Job trial_1.gms Stop 03/11/19 17:20:52 elapsed 1:12:24.161

Exit code = 10

### Re: GAMS for larger systems.

And sir, here are the lines from .lst file where mentioned about the memory allocation issues:

*** Out of Memory while executing line 4321

Heap Statistics for heap: BBMgr

Memory in use = 27,047 Mb

Highest memory used = 27,047 Mb

Large blocks available = 0

Statistics for small heap: gheap

Nr Allocated Slot #GetMem #FreeMem #FreeList

#Used

1 19 Mb 1- 8 2,538,936 0 53,104

2,538,936

2 4,448 b 9- 16 4,182 3,904 224

278

3 10,171 Mb 17- 24 1,768,542,604 1,324,163,809 691,551

444,378,795

4 83 Kb 25- 32 441,321,002 441,318,344 1

2,658

5 16,835 Mb 33- 40 441,321,746 9,155 0

441,312,591

6 2,496 b 41- 48 60 8 0

52

11 88 b 81- 88 1 0 0

1

16 1,152 b 121-128 9 0 0

9

17 39 Kb 129-136 297 0 0

297

24 0 b 185-192 27 27 2

0

32 2,048 b 249-256 8 0 0

8

--------------------------------------------------------------------------------

----------

Totals 27,025 Mb 2,653,728,872 1,765,495,247 744,882

888,233,625

Small block heap = 27,042 Mb (in 54083 blocks of 512 Kb each)

There are 23 other live blocks using 5,419 Kb

Highest memory mark 5,425 Kb

Live block statistics

#GetMem = 394

#FreeMem = 369

#ReAlloc = 9

ReAllocUsed = 1,152

#GetMem64 = 0

#FreeMem64 = 0

#ReAlloc64 = 0

ReAllocUsed64 = 0

String Heap Statistics

StrStore = 2,520

StrStoreQ = 0

StrTxtStore = 90

StrPCharStore = 0

StrGet = 7,358,709

StrSetQuote = 2,304

StrGetQuote = 0

StrGetPChar = 0

StrGetLen = 0

*** Out of Memory in New or GetMem.

*** HeapLimit = 1E20 MB HeapSize = 28361.1 MB

*** Out of Memory while executing line 4321

Heap Statistics for heap: BBMgr

Memory in use = 27,047 Mb

Highest memory used = 27,047 Mb

Large blocks available = 0

Statistics for small heap: gheap

Nr Allocated Slot #GetMem #FreeMem #FreeList

#Used

1 19 Mb 1- 8 2,538,936 0 53,104

2,538,936

2 4,448 b 9- 16 4,182 3,904 224

278

3 10,171 Mb 17- 24 1,768,542,604 1,324,163,809 691,551

444,378,795

4 83 Kb 25- 32 441,321,002 441,318,344 1

2,658

5 16,835 Mb 33- 40 441,321,746 9,155 0

441,312,591

6 2,496 b 41- 48 60 8 0

52

11 88 b 81- 88 1 0 0

1

16 1,152 b 121-128 9 0 0

9

17 39 Kb 129-136 297 0 0

297

24 0 b 185-192 27 27 2

0

32 2,048 b 249-256 8 0 0

8

--------------------------------------------------------------------------------

----------

Totals 27,025 Mb 2,653,728,872 1,765,495,247 744,882

888,233,625

Small block heap = 27,042 Mb (in 54083 blocks of 512 Kb each)

There are 23 other live blocks using 5,419 Kb

Highest memory mark 5,425 Kb

Live block statistics

#GetMem = 394

#FreeMem = 369

#ReAlloc = 9

ReAllocUsed = 1,152

#GetMem64 = 0

#FreeMem64 = 0

#ReAlloc64 = 0

ReAllocUsed64 = 0

String Heap Statistics

StrStore = 2,520

StrStoreQ = 0

StrTxtStore = 90

StrPCharStore = 0

StrGet = 7,358,709

StrSetQuote = 2,304

StrGetQuote = 0

StrGetPChar = 0

StrGetLen = 0

*** Out of Memory in New or GetMem.

*** HeapLimit = 1E20 MB HeapSize = 28361.1 MB

### Re: GAMS for larger systems.

That looks interesting. This runs out of memory while generating the model. GAMS uses 28GB before giving up. Without seeing the code it's hard to tell if you can improve this or not. Hope you can share the model and data. If you don't want to make model and data public in the forum you can still submit the model and data to support@gams.com. We will post a summary of our findings to the forum so everyone can benefit.

-Michael

-Michael

### Re: GAMS for larger systems.

Sir,

I've sent the codes to the mail address that you mentioned earlier.

Thank you.

I've sent the codes to the mail address that you mentioned earlier.

Thank you.