Main Content

simulink.cloud.Job

Job object to manage cloud simulations

Since R2024b

Description

Running multiple simulations with the batchsim function on a registered remote computing cluster creates a simulink.cloud.Job object. Use the simulink.cloud.Job object to manage simulations. With the simulink.cloud.Job object, you can fetch outputs of your simulations, cancel the running job, or delete an existing job from the remote computing cloud cluster.

The table summarizes the functions you can use with the simulink.cloud.Job object to manage simulations.

FunctionsPurposeExample
fetchOutput

Fetch simulation outputs.

Use the index to fetch outputs for simulations.

job = batchsim('clusterName','designStudy')
output = job.fetchOutput(1)
cancel

Cancel the running job.

Canceling the job removes the job from the remote computing cluster, but allows you to still access the simulink.cloud.Job object in MATLAB.

job = batchsim('clusterName','designStudy')
job.cancel()
delete

Delete the job from the remote computing cluster and MATLAB

Deleting the job deletes the job from the remote computing cluster and MATLAB.

job = batchsim('clusterName','designStudy')
job.delete()

Creation

Description

cloudJob = batchsim(clusterName, designStudy) creates a job object, cloudJob, that you can use to manage simulations on the remote cloud cluster.

Input Arguments

expand all

Name of the cluster to run simulations, specified as a simulink.cloud.Cluster object.

Inputs and configurations for massive parallel simulations, specified as a simulink.multisim.DesignStudy object.

Properties

expand all

This property is read-only.

Remote registered cluster for the job to run, returned as a string or a character vector.

This property is read-only.

Unique job ID, returned as a string or a character vector.

Path to the folder containing simulation outputs, returned as a string or a character vector.

State of the job that was run, returned as 'Queued', 'Running', 'Finished', 'Failed' , or 'Canceled'.

Progress of simulations stating the number of simulations completed, returned as a string or a character vector.

Running duration of the job, returned as a string or a character vector.

Error in simulations if present, returned as a string or a character vector.

Total number of simulations, returned as a double data type.

Number of completed simulations, returned as a double data type.

Date and time when the job was submitted, returned as a datetime object.

Simulation start time for the job, returned as a returned as a datetime object.

Version History

Introduced in R2024b