Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ETL Performance with Simulink
ETL Performance with Simulink [message #1794830] Fri, 07 September 2018 09:45 Go to next message
Stuart Hutchesson is currently offline Stuart HutchessonFriend
Messages: 8
Registered: September 2011
Junior Member
I'm using ETL to extract the top level "context" from Simulink models into an EMF equivalent (Sub-system names and IO). The logic appears to work fine but is extremely slow for large Simulink models (to the point where I'm having to terminate the execution)

I'm using a rule such as this to find the top-level subsystems (which works fine) :

rule Subsystem2Service
    transform s : Simulink!SubSystem
    to t :  M!camcoa::Service {
    
    guard : s.parent == null    // Only process top-level subsystems
    
    t.name = s.name;
    
    for (c in s.children)
    {
        ("Found : " + c.name).println();
    }
}


I was then invoking @lazy rules to populate the relevant child objects. However the "s.children" loop takes an age to terminate for big models, and I'm wondering if this is essentially doing :

Block.all.select(b|b.parent = self);


Which would be very very inefficient for large model hierarchies.

The Matlab/Simulink scripting language include the ability to restrict the model search depth (and block type) when traversing the model :

find_system('sldemo_clutch/Unlocked','SearchDepth',1,'BlockType','Goto')


If the ".children" operation is being implemented as I suspect, would it be possible to have some means of restricting the search depth?? Are there any other tips/techniques to speed up execution time for this type of transformation?
Re: ETL Performance with Simulink [message #1794846 is a reply to message #1794830] Fri, 07 September 2018 15:24 Go to previous messageGo to next message
Thanos Zolotas is currently offline Thanos ZolotasFriend
Messages: 45
Registered: November 2016
Location: York
Member
Hi Stuart,

Both .children and getChildren() are not implemented using the
Block.all.select(b|b.parent = self);

Instead, Matlab's find_system is used:
find_system(model,'SearchDepth',1,'Type','Block')

We need to do some profiling to find out possible reasons behind the slow performance on big models and we will come back to you.

Finally, it is of interest to filter the children based on their type as you suggest and we will work on that.
Re: ETL Performance with Simulink [message #1795203 is a reply to message #1794846] Tue, 18 September 2018 10:53 Go to previous message
Sina Madani is currently offline Sina MadaniFriend
Messages: 67
Registered: November 2015
Location: York, UK
Member
I just wanted to add that in the event that you do use
Block.all.select(b|b.parent = self);
and find it slow, the latest interim build of Epsilon now has parallel versions of first-order operations, so this could be changed to
Block.all.parallelSelect(b|b.parent = self);
if that helps.
Previous Topic:Create spreadsheet as a model using ETL
Next Topic:Run Etl
Goto Forum:
  


Current Time: Wed Sep 19 18:24:20 GMT 2018

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

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

Back to the top