Commenting Simulink Blocks in Parfor Loop

5 visualizaciones (últimos 30 días)
Jack
Jack el 29 de Jun. de 2015
I've a scenario where I am running numerous simulations of a Simulink model for a plant in different configurations. Changes between configurations include the multiple of similar sub-systems online, and also the mode in which those sub-systems interact.
I'd like to make use of both the Parallel Computing Toolbox, and the ability to comment out Simulink block, so I can run a single model with numerous configurations in a parfor loop. Is it possible to comment blocks in a parfor loop so that different parfor loop iterations have different blocks commented in the Simulink model? Or is there an issue caused? I'm assuming since in the regular use of parfor for Simulink models, the set_param command is used, that it could be used similarly for commenting blocks, unless there is some kind of compatibility issue caused.

Respuesta aceptada

Edric Ellis
Edric Ellis el 29 de Jun. de 2015
You should be able to do this by using set_param, something like this:
set_param('model/path/block', 'Commented', 'on') % or 'through'
  2 comentarios
Jack
Jack el 29 de Jun. de 2015
Thanks Edris, I understand that the set_param command can be used at the command line to comment blocks out or through. However, I'm asking whether there is issues in commenting different block in different iterations of a parfor loop? I had presumed not if the model is not saved at every iteration, therefore not saving the commenting of the blocks. However, I might be missing something where changing the structure of a model, not just the input parameters of a block, is disallowed in a parfor loop.
Vitor Henrique Madureira Biajo
Vitor Henrique Madureira Biajo el 9 de Mzo. de 2021
I'm having the same issue actually. I would like to comment/uncomment some blocks between different simulations. I receive a message that it's not possible to run a parallel simulation without saving the model though. How could I implement it?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing 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!

Translated by