Main Content

simulink.cloud.MultisimDatastore

Datastore for large-scale cloud simulation results

Since R2026a

Description

The simulink.cloud.MultisimDatastore object provides a way to access and analyze results from simulations run on cloud clusters. Using this datastore, you can retrieve one complete simulation result at a time for local post-processing. To process results from multiple simulations, you can explicitly iterate through the datastore in your code. Before creating and using the datastore object, you must log into your cloud storage account. For more information, see Work with Remote Data. You can use simulink.cloud.MultisimDatastore object only with the Large-Scale Cloud Simulation for Simulink Support Package.

Creation

Description

mds = multisimDatastore(job) creates a simulink.cloud.MultisimDatastore object from the simulink.cloud.Job object returned by batchsim.

mds = multisimDatastore(job,WaitForCompletion=tf) creates a simulink.cloud.MultisimDatastore object before all simulations are complete when WaitForCompletion is set to false.

Input Arguments

expand all

Cloud simulation job, specified as a simulink.cloud.Job object. This object is the output of the batchsim command used to run the cloud simulation job.

Option to wait for all simulations to finish before creating datastore, specified as 1 (true) or 0 (false). By default, WaitForCompletion is true, so the datastore is not created until all the simulations in the job have finished. You can create a simulink.cloud.MultisimDatastore object before all simulations in a job are complete by setting WaitForCompletion to false. In this case, the NumSims property of the datastore object reflects only the simulations that have completed when the datastore is created.

Data Types: logical

Output Arguments

expand all

Datastore for a collection of data from simulations run on the cloud cluster, returned as a simulink.cloud.MultisimDatastore object.

Properties

expand all

This property is read-only.

Number of simulations whose results are available in the datastore, specified as a double. If you create the datastore before the job is complete, NumSims reflects only the simulations that have completed at that time.

Object Functions

hasdataDetermine if simulink.cloud.MultisimDatastore has data available to read
readRead next unread simulation result from simulink.cloud.MultisimDatastore object
resetReset simulink.cloud.MultisimDatastore to read from first simulation result

Examples

collapse all

Create a simulink.cloud.MultisimDatastore object and read the simulation results.

Suppose you have already created a simulink.multisim.DesignStudy object and have a cloud cluster. Use the batchsim function with the design study object to launch a simulation on a cloud cluster.

cloudClusterURL = "yourcluster.example.com";
cloudCluster = simulink.cloud.addCluster('myCloudCluster',cloudClusterURL);
job = batchsim(cloudCluster,designStudy);

Create a datastore using multisimDatastore to fetch and store the simulation results from the simulink.cloud.Job object.

mds = multisimDatastore(job);

You can check if the datastore has unread data using hasdata. The while loop iterates through the entire datastore and the read function reads the simulation results for each simulation.

while hasdata(mds)
  simOut = read(mds);
end

You can reset the read position of the datastore using reset and start reading again from the first set of simulation results.

reset(mds)
data = read(mds);

Version History

Introduced in R2026a