Integrating Vensim and GAMS

Use this forum to post Vensim related questions.
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Post by LAUJJL »

Hi Tom

It would be nice if you explained the exact steps to follow when one wants to load any model from your http://models.metasd.com.
I use internet explorer, click on the model get a window and if I want to save it, I get a htm format file. I change the .htm to .mdl, and if I open the file with Vensim, I get the text format and if I want to transform into sketch, it says syntax error. It shows on the text file where the error is.
I have used too a different method.
I build a new model, name it, erase everything in the text format and then paste with Ctrl C and Ctrl V the image on your web site directly on the blank text model. It reacts the same with syntax error!
Best regards.
JJ
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Strange. I think the problem is Internet Explorer. I can replicate the .htm naming issue, but not the syntax error. Apparently there are browser issues around interpretation of text MIME types, so maybe I'll just post vmf format instead. A right-click-save works for me in Firefox.

Tom
ouzfalcon
Junior Member
Posts: 6
Joined: Wed Nov 18, 2009 8:15 am

Post by ouzfalcon »

I have same problem with the Sea Level Rise model, Grinsted_v3b‎.vpm.
I saved the file as .htm then changed to vpm ( and tried .mdl too). When I received 'Syntax Error msg when I tried to view as sketch.
I also tried changing character encoding to UTF-8 before saving the model as .htm. No succes.
With DICE model, by using same method, I viewed the model as text but no succes viewing as sketch.
I am not sure if I am missing something.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

I assume you are also using Internet Explorer? What version of Vensim are you using?
ouzfalcon
Junior Member
Posts: 6
Joined: Wed Nov 18, 2009 8:15 am

Post by ouzfalcon »

I tried with Firefox, IE and Google Chrome
i have latest DSS
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

I just tried this using IE and if you right click and then use Save Target As and change the extension to match the source (.mdl, .vpm, .vmf etc) everything seems to work fine. It is odd that IE wants to change the extension to html.

Tom - there are some server side settings that might make this easier. (eg modifying .htaccess).
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Post by LAUJJL »

Hi Bob

your method works fine!
One must right click instead of left clicking when one wants to download and then it ask for the name of a file with the extension you can choose.
Thank you.
Regards.
JJ
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Thanks for persisting, all. I've made some server settings changes, and everything should work now, regardless of browser or right/left click.

Tom
ouzfalcon
Junior Member
Posts: 6
Joined: Wed Nov 18, 2009 8:15 am

Post by ouzfalcon »

It works perfectly OK now.

Thank you Tom
Mojdeh
Junior Member
Posts: 2
Joined: Wed Jul 26, 2017 5:28 am
Vensim version: PLE

Re: Integrating Vensim and GAMS

Post by Mojdeh »

Good day!

There is a question about Vensim that I would be very thankful if you could help me in this regard.
I want to run the same model in Vensim and GAMS, for comparison, or run the two in sequence to solve different parts of a problem. (Actually, I run the model in GAMS and I need to know... How can I link it in Vensim)
Is it possible?

Many thanks for your time.

Sincerely yours,
Mojdeh
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Integrating Vensim and GAMS

Post by Administrator »

I've got no knowledge of GAMS, but I'd say linking with Vensim PLE is not going to be possible.

Most likely, GAMS has some sort of way to call a DLL. If this is the case, then Vensim DSS would be required (it comes with the Vensim API DLL).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Integrating Vensim and GAMS

Post by tomfid »

... or, similarly, you could write some custom code that would drive both Vensim (via the .dll or DDE) and GAMS (which presumably has its own API).

Some of what GAMS does can be replicated in Vensim using optimization or FIND ZERO, but it depends on the problem.

Yet another option would be to use Vensim's data I/O features and communicate through files.
Post Reply