Posted Mon, 14 Dec 2015 10:57:56 GMT by argantonio65
Dear DHI,

I'm a relatively new user of WEST. I've a single user license for research purposes (time limited). I would like to call WEST from external scripts in order to program simulations at the same time that I can change inputs, parameters or initial states of the model. The product that best suits this purpose is WESTforAutomation as mentioned in the Release note and the Getting started documents. Unfortunately, I could not find any further reference in the User Guide or other documents associated with the installation.

I'm interested to call WEST from either Python, R or C++ (in that order of preference). I have been reading that there is an SDK package that covers this possibilities. Is there additional information that I could check? Could you please further guide on this?

Thanks in advance,
Kind regards,
Antonio
Posted Mon, 14 Dec 2015 11:21:54 GMT by Filip Claeys
There is no traditional documentation on WESTforAUTOMATION, as we normally train WESTforAUTOMATION users "by example", based on their specific needs, in the scope of a commercial training session.

That being said, WEST can be automated in a least 4 ways:

- The simplest consists in executing the "texec.exe" command-line tool that is included in every WEST installation, for instance from a batch file.

- Another possibility is to use the "TornadoMEX" MEX DLL from MATLAB. TornadoMEX is included in recent versions of the WEST installer.

- Third possibility is to use "WESTforAUTOMATION", which basically is the "TornadoNET" .NET assembly that is part of every WEST installation, but can only be used with the proper license. This assembly allows for WEST experiments to be run from any .NET-enabled language, such as C#, F#, VB.NET, IronPython, IronRuby, C++/CLI and recent MATLAB versions. Also included in every recent WEST installer is the "TornadoCOM" assembly, which sits on top of the "TornadoNET" assembly and allows for WEST experiments to be run from COM-enabled programs such as MS Excel.

- Lastly it is also possible to run WEST experiments from languages such as C, C++, Java, CLIPS and R. For this, specific libraries and DLL's are required that are only available within the scope of a bilateral agreement.

In your case, since you mentioned Python as your first preference, it seems most appropriate to use the TornadoNET assembly from IronPython. I will send you an example program to illustrate how this works.

You must be signed in to post in this forum.