How to convert .mdl code to R code
-
- Newbie
- Posts: 1
- Joined: Mon Sep 16, 2024 4:59 am
- Vensim version: Ventity
How to convert .mdl code to R code
Hello, How to convert .mdl code to R code? I have searched many places but have not found a suitable solution. Thanks.
-
- Super Administrator
- Posts: 4847
- Joined: Wed Mar 05, 2003 3:10 am
Re: How to convert .mdl code to R code
You could try
https://github.com/jandraor/readsdr
https://github.com/jandraor/readsdr
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: How to convert .mdl code to R code
ReadSDR is a good suggestion.
An alternative that is likely more complicated would be to use SDEverywhere [https://sdeverywhere.org] to convert to C code. I'm pretty sure you can call C code from R. Or SDEverywhere also has the ability to run models from a command line (Terminal), which you might be able to use.
We've thought about adding the ability for SDE to output R code directly. If anyone is interested in helping with that, please post on the SDE GitHub discussion forum.
[https://github.com/climateinteractive/S ... iscussions]
An alternative that is likely more complicated would be to use SDEverywhere [https://sdeverywhere.org] to convert to C code. I'm pretty sure you can call C code from R. Or SDEverywhere also has the ability to run models from a command line (Terminal), which you might be able to use.
We've thought about adding the ability for SDE to output R code directly. If anyone is interested in helping with that, please post on the SDE GitHub discussion forum.
[https://github.com/climateinteractive/S ... iscussions]