Is there an automatic way to discover all of the physical modeling networks in a Simulink block diagram?
I'm managing a large project in which I am receiving models from several engineers for integration into a system-level simulation. When integrating the models, I need to connect several physical modeling networks between the subsystem models. Once I have the models connected, I need to track down all of the physical modeling networks to determine which ones are missing a solver configuration block or have an extra solver configuration block.
Currently I am doing this by analyzing the model and parsing the error messages, which is quite time consuming. Unfortunately, I have to do this (and a lot of other work) every time one of the contributing engineers submits an updated model.
I think I could partially automate this effort if I could find a way to discover all of the networks in the integrated model. If I could write a script to generate a list of the networks, I think I could then write another script that would could go through the generated list, and for each network in the list:
(1) get a list of the blocks in the network,
(2) inspect the blocks to make sure there is exactly one solver configuration block, and
(3) add/remove solver configuration blocks as needed.
I think I could even automate setting the parameters in the solver configuration blocks, but that is a different discussion.
Does anybody have any ideas on how I would do this?
P.S. The approach outlined above is my best guess at a solution to the problem. If somebody has a better approach, I'd like to hear it.