seupdate

Update models from previous releases

Syntax

seupdate('sys')
seupdate('sys', 0)

Description

seupdate('sys') updates a SimEvents® model that was created in a previous release to the current release.

This function replaces blocks in your model from previous versions of the SimEvents library with their latest version, without changing configured parameter values. If the model has associated custom libraries, the function also updates blocks in those custom libraries. The function inserts gateway blocks where a time-based signal feeds an event-based block, or where an event-based signal feeds a time-based block. If the model is not already open when you run this function, the software opens it to perform the update.

The function overwrites the model it is updating. Before beginning the update, the function completely backs up the model and associated custom libraries. The software stores this backup in a new folder, in the same directory as the model. The new folder uses the naming convention seupdate_for_sys.

When you run the seupdate function, the software provides a summary of the model and libraries it is preparing to update. The software then prompts if you are ready to proceed with the update. Enter one of the following responses:

  • y

    Overwrite the model and associated libraries.

  • n

    Cancel the operation. No changes are made to the model and associated libraries.

  • help

    In the SimEvents documentation, learn how the seupdate function changes your model.

seupdate('sys', 0) updates the model and referenced library components without prompting you.

Input Arguments

sys

Specify the name of the model to update.

Default: None

Examples

expand all

Model Migration Using seupdate

Use the seupdate function to migrate all blocks in a model to the latest version in the SimEvents library.

Run the seupdate function for the model that you want to migrate.

seupdate('ex_signalbasedevents_plots')

Review the items under the heading Before you udpate your model: and enter a value at the prompt.

Update model 'ex_signalbasedevents_plots'? ([y]/n/help):y

The first update step checks your model file format. If either the model or any associated library files are not in the newer SLX file format (that is, they are in the older MDL format), the software prompts you to ask if you want to save the updated model in the newer format. If your model is already in the SLX format, you do not see this prompt.

When you answer the file format prompt, the update process continues.

Review the report that the migration utility generates.

In this example, the model updates successfully.

Migration of Model Containing Queue Blocks Using seupdate

The behavior of queue blocks changed in SimEvents version 4.0 (R2011b). If the model that you want to migrate contains legacy queue blocks, the updated queue blocks might produce different results when you simulate the updated model. If the seupdate function detects that your model contains legacy queue blocks, you might see additional output in the MATLAB® command window. This additional output has information on how the behavior of queue blocks has changed from previous versions of the software. The output also provides instructions to check for potential results changes from queue blocks in the updated model before you proceed with the migration.

Run the seupdate function for the model that you want to migrate.

seupdate('ex_queue_system')

If your model contains any legacy queue blocks that have the #n output enabled, the seupdate function displays the additional output that is highlighted in the graphic.

Review the report that the migration utility generates.

In this example, the model updates successfully.

If you proceed with migrating your model using seupdate, but want to check your original model for queue blocks that produce different results in the updated version, use the backup copy of the original model that the seupdate function creates prior to migrating the model. The software stores the backup in a new folder, in the same directory as the model. The new folder uses the naming convention seupdate_for_sys.

Was this topic helpful?