How can I initalize bus objects with parsim in rapid acc mode?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sebastian
el 26 de Abr. de 2019
Comentada: Sebastian
el 28 de Abr. de 2019
Hello,
I want to run a Simulink model with busses with parsim in rapid accelerator mode. However, I get the error message 'The rtp structure passed in did not have a parameter bus_object'. It works if I execute the simulation in rapid accelerator mode with 'sim' only but not with 'parsim'. I attached a simple example file that produces the error. I am using version 2018b. Thanks for your help!
Best,
Sebastian
0 comentarios
Respuesta aceptada
Rahul Kumar
el 27 de Abr. de 2019
Hi Sebastian,
bus_object is not a variable used in the model and thus when the model is compiled for rapid accelerator, it does not appear as a rtp parameter which gives the error. Just remove the setVariable call for bus_object and it should work fine.
for i = 1 : length(final_value_sweep)
simin(i) = Simulink.SimulationInput(model);
simin(i) = simin(i).setModelParameter('SimulationMode', 'rapid-accelerator',...
'RapidAcceleratorUpToDateCheck', 'off');
simin(i) = simin(i).setVariable('final_value',final_value_sweep(i)); % sweep
end
Simulink.BlockDiagram.buildRapidAcceleratorTarget(model);
out = parsim(simin, 'ShowProgress', 'on');
If you need base workspace variables assigned to the workers, you can set 'TransferBaseWorkspaceVariables', 'on' with parsim.
Más respuestas (0)
Ver también
Categorías
Más información sobre Run Multiple Simulations 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!