Highlight the Virtual Blocks
Syntax: hilite_virtual_blocks()
modelName - String input of the model name.
This function is an attempt to hightlight the blocks those are not contributing to the model simulation directly.
This function is also useful to study the impact of optimization settings of model configuration parameters.
Idea: If we can't set "add_exec_event_listener" to a block, then it means it is optimizied for simulation.
please learn the function >>help add_exec_event_listener.
Sample: Unzip the contents and run hilite_virtual_blocks('check_path') in the MATLAB command prompt. Note: 'check_path' is a sample model in the attachment.
Please compare the Simulink block sorted order for the same. This gives some idea on how the Simulink engine works.
---- Sorted list for 'check_path' [2 nonvirtual blocks, directFeed=0]
0:0 'check_path/Constant' (Constant, tid=-2)
0:1 'check_path/Scope' (Scope, tid=1)
Call the function again by changing the optimization setting and note the differneces from the previous call.
Play it with a larger model. This function potentially can be used for studying model coverage.
Please feel free to improve and comment on this.