WSMLink`
WSMLink`

WSMInputFunctions

WSMInputFunctions is being phased out in favor of the association key "Inputs" in functions introduced experimentally in Version 11.3.

WSMInputFunctions

is an option for WSMSimulate and WSMSimulateSensitivity that specifies values for input variables.

Details

  • WSMInputFunctions takes the following values:
  • {var1fun1,}use funi[t] as input for vari at time t
    {var1{f1,f2,},}run simulations in parallel, with fj[t] as input for vari
  • Input functions can be set for all variables in WSMModelData[mmodel,"InputVariables"].
  • Each vari can be either a string or DotName.

Examples

open allclose all

Basic Examples  (3)

Load Wolfram SystemModeler Link:

Simulate a model with a given input:

Simulate the model that sets two inputs; the output is the sum of the inputs:

Plot the inputs and the output:

Simulate a model with a given input:

Simulate the model that takes the derivative of the input:

Plot the input and the output:

Simulate for several different inputs:

Scope  (5)

Show the response in room temperature, given a step in the outside temperature:

Use a TimeSeries as input to a model:

Define a time series and simulate:

Plot the input and the output:

Study a model for different inputs:

Simulate the model that derives the input for different trigonometric functions:

Plot the input and the output:

Give an input function for a variable and study the sensitivity of the output:

Simulate the model that integrates the input after applying a gain:

Plot the sensitivity of the output to the gain parameter:

Use a Piecewise function as input:

Applications  (1)

Find the parameter in an input function to a model by comparing to measurement data:

Set up caching for simulation:

Fit parameters to the measurement data:

Simulate with the fitted input function:

Show the test data and the calibrated model together: