Adrian,
As far as I have used the Matlab function, it’s been in the parametric diagram and not the activity diagram. I am unsure if you can do such a thing in activity diagram.
You can use the following syntax in a constraint equation in parametric diagram,
Output = xfwExternal(matlab,function,input1,…,inputN,output1,…,outputM)
I use MagicDraw and needed to install the ParaMagic plugin for this capability. Also chose Matlab as the core solver in the Environment settings. For more information, you can refer this tutorial,
http://www.isr.umd.edu/~austin/enes489p/lab-resources/ENES489P-MagicDraw-Tutorial2010-09-02.pdf, Page 70
Hope this is helpful.
Best,
Stueti
--
--
Thanks everyone for all the help!
True, forgot to mention that I am using Eclipse Papyrus. So I am guessing the alternative for MagaicDraw's "Paramagic" (mentioned by Stueti) for me would be Massif or Matclipse? (https://github.com/FTSRG/massif andhttp://undocumentedmatlab.com/blog/matclipse-eclipse-matlab-interface)
The way I hoped to do it is basically exactly the way described by Raphael Faudou - but I don't have the option to tick "Matlab" as a language in which the Opage (or any other) action is written, only C, C++, Java, Natural language and OCL. Is that what above mentioned plugins are for? Will try those out later and come back here with results.
Best,
Adrian.
Am Dienstag, 26. Mai 2015 16:53:21 UTC+2 schrieb Adrian:Hello everyone,
I have the following problem: For my model, I want to call a Matlab function from a behaviour action. I want to do this because I am modelling a waste treatment plant, and there are modules that have been very well described already in Matlab. So, ideally in my SysML model I want to have my input parameters; the call behaviour then calls a Matlab function with those parameters, which executes and gives back the result. That is then outputted.
I thought that that should not be too much of a problem, but I did not manage to do that yet. Do I really need additional plugins like Matclipse or Massif? (If so, which one do you prefer?) In an activity, does defining the language anything more than give additional information to the viewer of the diagram?
Thanks a lot!
Adrian
--
--
You received this message because you are subscribed to the Google
Groups "SysML Forum" group.
Public website: http://www.SysMLforum.com
To post to this group, send email to sysml...@googlegroups.com
To unsubscribe from this group, send email to
sysmlforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "SysML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sysmlforum+...@googlegroups.com.
To post to this group, send email to sysml...@googlegroups.com.
Visit this group at http://groups.google.com/group/sysmlforum.
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/7a6a320e-d44f-4cbd-adf4-a26229de1a2f%40googlegroups.com.
Hello Raphael,
I hope I am not very much missing something here, but: Doing so, this will not give any more information to the SysML environment than any Action written in "Natural Language" would, right? As an "arbitrarily" named language obviously does not execute Matlab to run the specified action.
As an example maybe: Let's assume I want to change the value of a flow. As far as I get it, I can do that via an action directly writing that value or via a constraint. The above-mentioned methods either need a commercial SysML program (with possibly the appropriate plugins), or (Raphaels answer) will "only" convey this information to a human looking at the diagram, intepreting the action himself.
Am I right so far? Will take a look at the Matlab-plugins for Eclipse Papyrus I found so far, be back with updates!
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/8678e633-16ff-4f4e-a81f-9e340e9e74ca%40googlegroups.com.