WSMLink`
WSMLink`

WSMCreateDataModelString

WSMCreateDataModelString is being phased out in favor of CreateDataSystemModel, which was introduced experimentally in Version 11.3.

WSMCreateDataModelString["newmodel",{v1,v2,}]

creates a string with the Modelica model "newmodel" of the values vi.

WSMCreateDataModelString["newmodel",{{t1,v1},}]

creates a string for the time-value pairs {ti,vi}.

WSMCreateDataModelString["newmodel",ts]

creates a string for the TimeSeries ts.

WSMCreateDataModelString["newmodel",fun,tmin,tmax]

creates a string with samples from the function fun between tmin and tmax.

Details and Options

  • WSMCreateDataModelString takes the same arguments and options as WSMCreateDataModel.
  • Instead of committing newmodel to the System Modeler kernel, WSMCreateDataModelString returns a Modelica string representation.

Examples

open allclose all

Basic Examples  (4)

Load Wolfram System Modeler Link:

Create a model string from a list of time-value pairs:

Create a model string from a TimeSeries:

Create a model string of a function sampled each second between 0 and 10 seconds:

Properties & Relations  (1)

Use WSMCreateDataModel to create a model in the System Modeler kernel:

Simulate and plot the output: