Dear Steve,
in gdxmrw03.gms I uncommented matlab call in the beginning in the document and it seems that some of them works. I do not know if ‘gen_rbig.gms’ is missing intentionally, or I just missed it somewhere.
So I tried to run a small example, because actually what I need to do is just to run a model couple times with different parameters and then plot some results. So I just need to extract the optimal solution after the model is solved. The small example I try to run is one described in that tutorial I posted before. I also attach the qp.gms file I use.
First thing I noticed is, that when I run
gams qp.gms
It actually does not solve the model. But again maybe it is just right that this does not work and if I want to solve it this way, I just need to use Terminal. However, following the instructions for this example, I should run following command in matlab and it should me store at least values from x into the matlab workspace
x = gams(‘qp.gms’)
But instead I receive
Error using gams
Number of output argument in Matlab exceed output argument specified in gams
And finally, when I checked the function gams.m in the gams folder, it has only commented help in it and no body. And again, I find this a bit strange, but at least it explains me the error if there is actually no function coded in the m-file.
Thank you,
Pavol
On Thursday, 29 January 2015 16:14:58 UTC+1, Steven Dirkse wrote:
Pavol,
Your claim that GDXMRW is not working at all isn’t consistent with the result you report running testinst: that worked OK for you. So something is working. To find out why gdxmrw03 isn’t able to run, do some debugging. For example, the .lst file indicates the matlab call failed. Do all Matlab calls fail when you make them from GAMS? What is in the log file created by Matlab?
It’s also useful to create a minimal example that illustrates the problem. Usually you learn something in the process.
-Steve
On Thu, Jan 29, 2015 at 8:38 AM, Pavol Hronsky wrote:
Hey all!
I have a bit of a trouble forcing Matlab and Gams to work together. I run the newest version of the gams 24.4.1 on the Mac (OS X 10.10.2) together with Matlab 2014b. Gams alone works just fine, just as Matlab.
I followed every step in the installation tutorial in here:
http://www.gams.com/dd/docs/tools/gdxmrw/index.html#GDXMRW_APPENDIX_A
I was able to unpack the “gdxmrw0*” files, but when I actually try to run a test, it doesn’t work. That means, when I enter into Matlab command window following …
gams gdxmrw03.gms
I receive an error saying …
Error using gams
abnormal GAMS termination running /Applications/GAMS/gams24.4_osx_x64_64_sfx/gams gdxmrw03.gms lo=0:
check listing file
The actual listing file is attached.
The weird thing is, that when I run “testinst.m” file …
testinst
testinst run completed successfully: no errors
See testinst log file testinstlog.txt for details
it reports no error. (log also attached).
Can anybody direct me where in the process of trying to connect Matlab and Gams I did mistake?
Thank you
Pavol
–
gdxmrw03.gms (1.75 KB)
gdxmrw03.lst (4.24 KB)
qp.gms (849 Bytes)
qp.lst (7.54 KB)
gams.m (2.39 KB)