Main Content

decreaseOrder

Change component initialization order to earlier

Since R2024b

    Description

    decreaseOrder(initializeFunctionObj) decreases order of the specified initialize function initializeFunctionObj by 1.

    Examples

    collapse all

    This example shows how to schedule the order of component initialization.

    1. Open and simulate the model to populate it with functions.

      model = systemcomposer.openModel("scServiceInterfaceExample");
      sim("scServiceInterfaceExample");
    2. View the initialize functions sorted by order of component initialization.

      initializeFunctions = {model.Architecture.Initialization.Name}'
    3. Decrease the order of the first function.

      decreaseOrder(model.Architecture.Initialization(1))
      initializeFunctions = {model.Architecture.Initialization.Name}'
    4. Increase the order of the third function.

      increaseOrder(model.Architecture.Initialization(3))
      initializeFunctions = {model.Architecture.Initialization.Name}'

    Input Arguments

    collapse all

    Initialize function, specified as an systemcomposer.arch.InitializeFunction object.

    Version History

    Introduced in R2024b