Main Content

Set Up 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 named BasicModelingProject, which contains these files:

  • Function BasicModelingBusObjects.m

  • Script BasicModelingDataController.m

  • Script BasicModelingDataPlant.m

  • Script BasicModelingVariantChoice.m

  • Model file BasicModelingController.slx

  • Model file BasicModelingHierarchy.slx

  • Model file BasicModelingOperatorVariant.slx

  • Subsystem file BasicModelingPlant.slx

To group the files by type in the project, right-click the Type column and select Group by > Type.

Project files grouped by type

The function, scripts, and top model are configured to run at startup. The top model named BasicModelingHierarchy opens when you open the project.

The top model in the model hierarchy has a project shortcut. To reopen the top model if you close it, in the MATLAB® Toolstrip, on the Project tab, in the Shortcuts gallery, click Open Top Model.

Using this project, you can explore these project capabilities:

  • Automate tasks.

  • Create shortcuts for common actions.

  • Analyze file dependencies.

  • Analyze the impact of changing files.

  • Compare model files.

To view a dependency analysis of the files in the project, in the MATLAB Toolstrip, on the Project tab, in the Tools gallery, click Dependency Analyzer.

A dependency graph shows the two-level model hierarchy, in which the top model depends on a referenced subsystem and referenced models. To update the graph, in the Dependency Analyzer toolstrip, click Analyze.

Dependency graph of project files in the Dependency Analyzer

To display the properties of a dependency arrow, in the dependency graph, click a dependency arrow. The Properties pane displays the properties, including the dependency type.

In this example, the scripts and functions are run by callbacks.

Properties of the dependency arrow between files BasicModelingController.slx and BasicModelingDataController.m

Since the scripts and functions run at startup in the project, the callbacks are redundant and can be removed.

See Also

|

Topics