Using parallel computing WITHIN a Simulink simulation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have a for loop within a my simulink model (using the For Iterator block). In my case, I have around 2000-3000 iterations each time step. From my searching, I have only found that parallel computing can only be used to run simulations in parallel, rather than within a single simulation. Is it possible to use parallel computing for the for loop within a single simulink simulation?
0 comentarios
Respuestas (1)
Ryan G
el 23 de Oct. de 2012
You cannot use parallel computing for this operation. Can I ask why you are doing this? Although there may be a perfectly valid reason, perhaps reconsidering your approach may help speed things up.
2 comentarios
Ryan G
el 23 de Oct. de 2012
Editada: Ryan G
el 23 de Oct. de 2012
I don't believe you can do it in a MATLAB function either. Maybe, but I wouldn't try it.
Have you looked into turning the subsystem into a model reference and running in accelerator mode? That would definitely speed things up and is supported.
Lookup tables can also be kind of slow, have you considered alternatives to the lookup? If they are simple (2-d, maybe 3-d) you may be able to fit an equation to the data and use that instead. Might be faster.
I do want to reiterate what I mentioned earlier as this 1000 input line throws a red flag in my mind. Although it is fully possible this is the best/fastest way to do the operation you desire, whenever I see the same thing being repeated, I have to step back and look at the problem to make sure it's the best way to do it.
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!