The Versions Window for the COMSOL Desktop Model
The Versions window in the Model Builder workspace shows the history of the model opened in the COMSOL Desktop when that model is opened from a database or was last saved to a database. You can use the Versions window to, for example, quickly get an overview of recently saved versions, compare what was changed between two versions, open older versions, or even restore an older version as a new latest version.
From the Windows menu () in the Layout section of Model Builder’s Home toolbar, select Versions () to open the Versions window.
The window contains a table with versions of the model sorted in chronological order, most recent first. A maximum of 100 versions are initially retrieved from the database. Click the Show More button () to append the next 100 versions to the table. You can set another value for this default page size in the Result Page Size field on the Model Manager page in the Preferences dialog box. The version that is opened in the COMSOL Desktop is highlighted in bold, which typically is the first table row.
The table columns are:
The type column — the type of the model version represented by an icon. See Item Version Types and Item Save Types.
The Title column — the title set for the model in that version.
The Saved column — the time when the version was saved.
The Saved By column — the name of the user that saved the version.
The Branch column — the target branch the version was saved in. There is only a single branch, default named Main, when creating a new database.
The Comments column — the optional comment provided when the version was saved.
The Versions Window Toolbar
The toolbar above the table contains the following toolbar buttons:
Click the Refresh button () to refresh the table in case a new version has been saved. The table will automatically refresh if you save a new version to the database from the COMSOL Desktop.
Click the Show More button () to append older versions to the table.
Click the Version Details button () to open The Version Details Dialog Box containing more information on a specific version.
Click the Open button () to open a selected version in the COMSOL Desktop.
Click the Run button () to launch and run a selected version in the COMSOL Desktop. Only enabled if the selected version is an application.
Click the Compare button () to compare a selected version with the model opened in the COMSOL Desktop. Select two versions to compare them with each other. See Comparing Models Saved in Databases.
Click the Restore Version button () to save the selected version as a new latest version of the model opened in the COMSOL Desktop. The target branch for the save is the same as that of the opened model version. See Restore Version for further details.
If you right-click a model version, you can also:
Select Disk Space Usage () to see an estimate of the required disk space usage if the model version is saved to the file system. See Estimating Disk Space Usage.
Select Copy Location () to copy a text string with a URI that uniquely identifies the model version in the database to the clipboard. See Copying Model and File Locations.
Select Clear Computed Data () to clear all built, computed, and plotted data of the model version. Data shared with other model versions via deduplication will not be deleted from the database. Clearing cannot be undone. See Built, Computed, and Plotted Data.
Select Permanently Delete () to permanently delete the model version in the database. Data shared with other model versions via deduplication is not deleted. Permanently deleting cannot be undone. See Permanently Deleting Models and Data Files.
Estimating disk space usage, clearing computed data, and permanently deleting is also supported when selecting multiple model versions in the table.
Splitting a Model Version History in Two
When you create a new model from an existing model, for example by saving a new draft or selecting Save as New () in the Save window, the Model Manager database stores a reference to the origin model from the new model (or rather, the version of the original model that was saved from). You can think of the new model as being split off from the original model, such that the new model receives its own identity and version history.
The Versions window helps you keep track of a model’s potential origin by including the versions of the latter up to the source version that the new model was created from in the window’s table — see Figure 2-1 for a schematic representation. Versions of the origin model saved after the current model was created are not included in the table, owing to the fact that their changes are not included in the current model.
You are likely to first encounter this split-off in the Versions window when saving a new draft from a regular model — see Saving Drafts of Models. The top table rows correspond to the versions of the saved draft. The remaining table rows are the versions of the regular model that the draft originated from.
Figure 2-1: A schematic of the version history of three models, with the chronological order of versions read from left to right. The first version of the middle model was created from the third version of the top model, and the first version of the bottom model was created from the second version of the middle model. The version history of the top model includes three versions, that of the middle model includes six versions, and that of the bottom model includes seven versions. The history of the bottom model does not include the third version of the middle model as that was saved after the bottom model was split off.
The Versions Window and Multiple Branches
The version history of a model becomes even more complex once you create additional branches in your Model Manager database. The Versions window shows the history of the model with respect to the latest version on a particular branch, with the intent of visualizing how one version has progressed to the next by going upward in the table until reaching that latest version. Versions of the model saved on other branches are not included in the table unless the current branch was created from one of those other branches — see also Branching. If so, versions saved on that parent branch are appended at the bottom of the table if the version was saved before the current branch was created. Other versions on the parent branch saved at a more recent date, or versions saved on unrelated branches, are excluded by the assumption that they correspond to independent work done in parallel and whose changes are thus unrelated to the model version currently opened in the COMSOL Desktop.
You can see all versions of a model, irrespective of branch, by adding the model to The Maintenance Window in the Model Manager workspace. From the window, you gain a complete overview of the full footprint of the model in the database, but may lose a sense of how the model has evolved over time.