Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Simulink M2M transformation - what is a good approach?
Simulink M2M transformation - what is a good approach? [message #798398] Tue, 14 February 2012 16:40 Go to next message
Juraj Feljan is currently offline Juraj FeljanFriend
Messages: 2
Registered: February 2012
Junior Member
Hi,
I want to do a transformation from one Simulink model to another, and I would like some opinions on what is the best approach (I have asked the same question in a Simulink/Matlab forum but unfortunately got no answer).

Simulink models are stored as .mdl files in a JSON-like text format. There is a Matlab API for manipulating Simulink models (functions like find_system, add_block, add_line...). I'm looking for a maintainable approach with not too much overhead, and an approach that would preferably spare me reverse engineering the .mdl format.

First I was thinking to do the transformation in Java using Conqat - a Simulink model to POJO parser. The problem is that Conqat is read only - I can parse the source Simulink model, manipulate it, but there is no way (I'm aware of) to write the destination model to an .mdl file.

Another possible approach would be to parse the source model using Conqat, go from POJOs to EMF and use QVT or ATL for the transformation. But here there is again the above problem, how to go back from EMF to .mdl.

So in the end I used Matlab's API, but this is not pretty (Matlab code is a mess for writing a M2M transformation). My source and destination metamodels will change often, meaning that it will be hard to maintain the transformation written using the Matlab programming language.

I will be very grateful for any opinions on this, as googling did not give me any useful results.

Regards,
Juraj

[Updated on: Wed, 15 February 2012 09:52]

Report message to a moderator

Re: Simulink M2M transfromation - what is a good approach? [message #798411 is a reply to message #798398] Tue, 14 February 2012 17:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

I'd certainly recommend Matlab -> Ecore -M2M-> Ecore -> Matlab. I
suspect that the Matlab/Ecore Tx's are available already, if not you can
at least contribute them for others. Xtext and Acceleo may be helpful.

Regards

Ed Willink

On 14/02/2012 16:40, Juraj Feljan wrote:
> Hi, I want to do a transformation from one Simulink model to another,
> and I would like some opinions on what is the best approach (I have
> asked the same question in a Simulink/Matlab forum but unfortunately
> got no answer).
> Simulink models are stored as .mdl files in a JSON-like text format.
> There is a Matlab API for manipulating Simulink models (functions like
> find_system, add_block, add_line...). I'm looking for a maintainable
> approach with not too much overhead, and an approach that would
> preferably spare me reverse engineering the .mdl format.
> First I was thinking to do the transformation in Java using Conqat - a
> Simulink model to POJO parser. The problem is that Conqat is read only
> - I can parse the source Simulink model, manipulate it, but there is
> no way (I'm aware of) to write the destination model to an .mdl file.
>
> Another possible approach would be to parse the source model using
> Conqat, go from POJOs to EMF and use QVT or ATL for the
> transformation. But here there is again the above problem, how to go
> back from EMF to .mdl.
> So in the end I used Matlab's API, but this is not pretty (Matlab code
> is a mess for writing a M2M transformation). My source and destination
> metamodels will change often, meaning that it will be hard to maintain
> the transformation written using the Matlab programming language.
> I will be very grateful for any opinions on this, as googling did not
> give me any useful results.
>
> Regards,
> Juraj
Re: Simulink M2M transfromation - what is a good approach? [message #819231 is a reply to message #798411] Mon, 12 March 2012 16:53 Go to previous message
Juraj Feljan is currently offline Juraj FeljanFriend
Messages: 2
Registered: February 2012
Junior Member
Hi,
sorry for not replying sooner. Thanks for your answer and suggestions. I will look into them.

Regards,
Juraj
Previous Topic:Metamodel in workspace in QVTO Problem
Next Topic:[ATL] AtlLuncher class
Goto Forum:
  


Current Time: Sun Dec 21 05:39:54 GMT 2014

Powered by FUDForum. Page generated in 0.01548 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software