Main Content

updateDuplicateNames

(To be removed) Disambiguate duplicate component names in SimBiology model

Since R2022b

updateDuplicateNames will be removed in a future release. SimBiology automatically updates the duplicate names when you load a model. (since R2024a)

Description

updateDuplicateNames(model) renames components with same names in a SimBiology model. Use this function to disambiguate duplicate model component names in your model if any. In a future release, within a single model, model components will be required to have unique names even when they are of different types with the following two exceptions:

  • Species in different compartments can have the same name.

  • Parameters can have the same name if they are scoped to different parents. Specifically, you can use the same name for a model-scoped parameter and reaction-scoped parameters, where each reaction-scoped parameter belongs to a different reaction.

For details, see Guidelines for Naming Model Components.

[isUpdated,changes,modelBackup] = updateDuplicateNames(model) returns additional information about the changes made to the model, including the logical flag isUpdated that indicates whether any updates were made to the model, a list of changes, and a backup copy modelBackup of your model without any changes made.

Input Arguments

collapse all

Input model, specified as a scalar SimBiology Model object.

Output Arguments

collapse all

Flag indicating whether model was updated by the function, returned as a logical 1 (true) or 0 (false).

List of changes made to the model, returned as a SimBiology.DiffResults object. Use the visdiff function to inspect the changes in the Comparison Tool.

Copy of the input model before changes were made to it by the function, returned as a scalar SimBiology Model object.

Version History

Introduced in R2022b

collapse all

R2024a: updateDuplicateNames will be removed

updateDuplicateNames will be removed in a future release. SimBiology automatically updates the duplicate names when you load a model.