Optimization of calculation-intense Simulation using Matlab

Moderator: Moderators

Optimization of calculation-intense Simulation using Matlab

Postby kfisher@strattechnologies.com » Wed May 26, 2021 10:00 am

Hello,

I am utilizing the Cameo Simulation toolkit in a slightly unconventional way.
I have reverse engineered a Matlab script into CSM. The simulation contain a number of loops, which each execute >100 times and contain linear algebra equations in Matlab language opaque actions. I am utilizing value properties (in context) as well as activity properties to have access to all of the values I need for the decision nodes and Matlab calculations.

The problem is, it is taking literally >12 hours to run the simulation. Are there ways to optimize the performance of the simulation? I am not aware of how values are loaded into memory, if they are cached, etc.
My maximum heap size is set to 20,000.

Thank you
kfisher@strattechnologies.com
Forum Newbie
Forum Newbie
 
Posts: 11
Posts Rating:0
Joined: Wed Mar 03, 2021 9:43 am

Re: Optimization of calculation-intense Simulation using Matlab

Postby saulius_p » Wed May 26, 2021 11:45 am

Hello,

Good to talk to you!

What language do you use to execute equations in Cameo?

How long same calculation takes to execute in Matlab?

Sincerely,
Saulius
Best regards,
Saulius Pavalkis
User avatar
saulius_p
No Magic
No Magic
 
Posts: 345
Posts Rating:17
Joined: Fri Dec 04, 2009 5:37 am
Full name: Saulius Pavalkis

Re: Optimization of calculation-intense Simulation using Matlab

Postby kfisher@strattechnologies.com » Thu May 27, 2021 8:31 am

Thank you for the response, Saulius!

I am using mostly Matlab, because I require matrix operations for eigenvalues, ctranspose, dot product, etc. My default language is JavaScript, but I am also using Built-in-Math for some opaque expressions.
I have tried to speed things up by combining 3 or 4 Matlab expressions in a single opaque action, but even so, each opaque action takes ~1 second to complete, and because I am looping through a number of them thousands of time, it adds up.
kfisher@strattechnologies.com
Forum Newbie
Forum Newbie
 
Posts: 11
Posts Rating:0
Joined: Wed Mar 03, 2021 9:43 am


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 0 guests