Skip to main content
Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 342) Class which does everything that a combination of a DataHistory and a JobManager can do. Can be implemented using the inputs to a normal construct(…) call, but can do something else entirely. Thread-safe.

Members

Properties

Property dataHistory

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 1)
Get or set the data history to use; one may be created if you don’t specify it. Return type: LPDISPATCH

Property validateAll

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 1)
Hint on whether to force all outputs in the model to evaluate regardless of whether it would be necessary to get the responses/outputs that have been requested. Default: false. Return type: boolean

Property runInParallel

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 1)
Whether to run runs in parallel. May be ignored. Return type: boolean

Property numThreads

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 1)
The number of threads or instances to use for parallel execution. May be ignored. Return type: long

Property numRuns

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 376)
Get the number of runs. Return type:

Property numVariables

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 381)
Get the number of inputs. Return type:

Property supportsParallelExecution

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 413)
Can this job manager support parallel execution? If false, runInParallel and numThreads are ignored. Return type:

Property canNewJob

Definition: ModelCenter/src/InterfaceDLL_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 418)
Can a new job be started now? Return type:

Public functions

Function getVariableEquation

Get the equation for the variable at the specified index. Parameters:
  • index: The index.
Returns: The equation. Parameters:
  • long index
Return type: BSTR

Function getVariableDisplayName

Get the unique display name of a variable. Parameters:
  • index: The index.
Returns: The display name. Parameters:
  • long index
Return type: BSTR

Function isDesignVariable

Get the type associated with the specified variable. Parameters:
  • which: The name or index of the variable.
Returns: The variable type. Parameters:
  • VARIANT which
Return type: boolean

Function isInput

Get the type associated with the specified variable. Parameters:
  • which: The name or index of the variable.
Returns: The variable type. Parameters:
  • VARIANT which
Return type: boolean

Function newJob

Start a new job. Discards existing data and run info. Does not clear out variables. Note: whether you can start a new job while one is running depends on implementation. Parameters:
  • numRuns: The number of runs to execute.
Exceptions:
  • InvalidOperationException: If a job is running but the current implementation does not support concurrent jobs.
Parameters:
  • long numRuns
Return type: void

Function clear

Clear out the current job and all variables. Return type: void

Function addVariable

Add a variable. Parameters:
  • equation: The equation of the variable.
  • displayName: The display name to use for the value.
  • isInput: Whether the variable is an input.
Parameters:
  • BSTR equation
  • BSTR displayName
  • boolean isInput
Return type: void

Function setInput

Set an input value. Parameters:
  • runIndex: The index of the run.
  • which: The name or index of the variable.
  • value: The value to set (in native format; do not convert to string)
Parameters:
  • long runIndex
  • VARIANT which
  • VARIANT value
Return type: void

Function setRunInputs

Set all of the inputs for a run. Parameters:
  • runIndex: The index of the run.
  • values: The values, which must have the same number of elements as
  • which: The indices or names of the variables to set, omit for all
Parameters:
  • long runIndex
  • SAFEARRAY(VARIANT) values
  • [optional] SAFEARRAY(VARIANT) which
Return type: void

Function setVariableInputs

Set all of the inputs for one variable. Parameters:
  • which: Which variable (index or name).
  • values: The values to set.
  • runIndices: The runs to set values for; if null/empty, assume all.
Parameters:
  • VARIANT which
  • SAFEARRAY(VARIANT) values
  • [optional] SAFEARRAY(long) runIndices
Return type: void

Function runJobAsync

Execute the job. Returns: The result of the job, which will be populated in real-time. Return type: ITradeStudy3JobResult *

Function getMetaDataProvider

Get the metadata provider for this job manager. Return type: IVariableMetaDataProvider *