Gentlemen,
I have to call GAMS in a loop from Matlab but I get irregular errors.
I use a calculated value of the previous GAMS execution and use it in
the next execution.
I do this for 96 times (96 quarters in a day)
Very seldom Matlab completes this loop (96running times of GAMS),
often it breaks somewhere irregularly with the error appended below.
If I continue the loop manually from the 2nd last iteration of the
error till the end, it works. So I don’t think it depends on the
values in the model since I use the second last value which was
calculated by the loop which ended up throwing an error.
In short, with the same data, GAMS throws an error for a different
progression in the loop!
for index = 1:length_RT_schedule
loadxls_realtime(index+startpoint-1, e_bufferRT(index),pricedata);
tic
index
a = gams(‘real_time’);
toc
e_bufferRT(index+1) = a.val(2,2);
end
to get an output with the “gams()” commando, I used these lines in
GAMS:
$set matout "‘realtimeout.gdx’, e_buffer ";
$if exist matdata.gms $include matdata.gms
execute_unload %matout%;
the error:
Microsoft Visual C++ Runtime Library
Runtime Error!
Program: C:\Program Files\GAMS23.7\gams.exe
This application has requested the Runtime to terminate it in an
unusual way.
Another error I sometimes get is a.val(2.2) is empty. If I look in
the .lst file, I find a SOLVER & MODEL error no. 13
Thank you very much
\