Main Content

mrm.execution.compiler.buildDeployableArchive

Create deployable archive of Modelscape model

Since R2023b

    Description

    mrm.execution.compiler.buildDeployableArchive(model) creates a deployable archive of an mrm.execution.Model object. This function requires the Modelscape™ for MATLAB® support package and MATLAB Compiler SDK™.

    mrm.execution.compiler.buildDeployableArchive(model,Name=Value) creates a deployable archive with additional options specified using name-value arguments.

    results = mrm.execution.compiler.buildDeployableArchive(___) creates a deployable archive and returns the build information as a compiler.build.Results object using any of the input argument combinations in previous syntaxes. The build information consists of the build type, the path to the compiled archive, and build options.

    example

    Examples

    collapse all

    Create archive for deploying a Modelscape model to MATLAB Production Server™. For example, to build an archive of a model named WeightedSum, run:

    modelInstance = WeightedSum;
    mrm.execution.compiler.buildDeployableArchive(modelInstance)

    Input Arguments

    collapse all

    Modelscape model, specified as a subclass of the mrm.execution.Model class. This model must implement three methods for specifying the inputs and the outputs of the model: getInputs, getParameters, and getOutputs. For more details, see Model Implementation for Modelscape Deploy.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: mrm.execution.compiler.buildDeployableArchive(myModel,OutputFolder="D:\Documents\MATLAB\work\MyModelArchive",AdditionalFiles="MyFile")

    Path to the output folder where the build files are saved, specified as a string scalar or character vector. The path can be absolute or relative to the current working folder.

    The default name of the build folder is the archive name appended with productionServerArchive.

    Example: OutputFolder="D:\Documents\MATLAB\work\MyModelArchive"

    A list of files and folders to include within the production server archive, specified as a string scalar, character vector, string array, or cell array of character vectors.

    Example: AdditionalFiles="MyFile"

    Output Arguments

    collapse all

    Information about the build, returned as a compiler.build.Results (MATLAB Compiler SDK) object. The Results object consists of:

    • Build type, which is productionServerArchive

    • Path to the deployable archive file

    • List of included support packages

    • Build options, specified as a ProductionServerArchiveOptions object

    Version History

    Introduced in R2023b