Main Content

Set Up a File Management System

As a model grows, managing referenced files and dependencies becomes more complicated. To reduce the complexity of managing large models, you can use projects. Projects in Simulink help to organize large model hierarchies by finding required files, managing and sharing files and settings, and interacting with source control.

Open the project BasicModelingProject, which contains these files:

  • Subsystem file ex_modeling_mechanical_system.slx

  • Model file ex_modeling_variants.slx

  • Model file ex_modeling_controller.slx

  • Model file ex_modeling_operator_variant.slx

  • MATLAB script ex_modeling_data_mechanical_system.m

  • MATLAB script ex_modeling_data_controller.m

  • MATLAB script ex_modeling_variant_choice.m

  • MATLAB function ex_modeling_bus_objects.m

The MATLAB scripts and function are configured to Run at Startup.

The top model in the model hierarchy has a project shortcut. To open this model, on the Project Shortcuts tab, click Open Top Model.

Using this project, you can explore project capabilities, such as these capabilities:

  • Automate tasks

  • Create shortcuts for common actions

  • Analyze file dependencies

  • Analyze the impact of changing files

  • Compare model files

In the Views pane of the project, select Dependency Analyzer.

To run a dependency analysis on all the files in the project, click Analyze.

In the dependency graph that opens, click a dependency arrow to display its properties, including its dependency type, in the Properties pane. In this example, the MATLAB scripts and functions are run by model callbacks. Since these files run at startup in the project, the model callbacks are redundant and can be removed.

The dependency graph also shows the two-level model hierarchy, in which the top model depends on a referenced subsystem and referenced models.

See Also

|

Related Topics