Interface TradeStudyPlugIn::ITradeStudy3JobManager
Last update: 16.07.2025
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
- addVariable
- canNewJob
- clear
- dataHistory
- getMetaDataProvider
- getVariableDisplayName
- getVariableEquation
- isDesignVariable
- isInput
- newJob
- numRuns
- numThreads
- numVariables
- runInParallel
- runJobAsync
- setInput
- setRunInputs
- setVariableInputs
- supportsParallelExecution
- validateAll
Properties
Property dataHistory
Definition: ModelCenter/src/InterfaceDLL\_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 1)
LPDISPATCH TradeStudyPlugIn::ITradeStudy3JobManager::dataHistory
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)
boolean TradeStudyPlugIn::ITradeStudy3JobManager::validateAll
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)
boolean TradeStudyPlugIn::ITradeStudy3JobManager::runInParallel
Whether to run runs in parallel. May be ignored.
Return type: boolean
Property numThreads
Definition: ModelCenter/src/InterfaceDLL\_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 1)
long TradeStudyPlugIn::ITradeStudy3JobManager::numThreads
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)
TradeStudyPlugIn::ITradeStudy3JobManager::numRuns
Get the number of runs.
Return type:
Property numVariables
Definition: ModelCenter/src/InterfaceDLL\_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 381)
TradeStudyPlugIn::ITradeStudy3JobManager::numVariables
Get the number of inputs.
Return type:
Property supportsParallelExecution
Definition: ModelCenter/src/InterfaceDLL\_TradeStudyPlugIn/TradeStudyPlugIn.odl (line 413)
TradeStudyPlugIn::ITradeStudy3JobManager::supportsParallelExecution
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)
TradeStudyPlugIn::ITradeStudy3JobManager::canNewJob
Can a new job be started now?
Return type:
Public functions
Function getVariableEquation
BSTR TradeStudyPlugIn::ITradeStudy3JobManager::getVariableEquation(long index)
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
BSTR TradeStudyPlugIn::ITradeStudy3JobManager::getVariableDisplayName(long index)
Get the unique display name of a variable.
Parameters:
- index: The index.
Returns:
The display name.
Parameters:
- long index
Return type: BSTR
Function isDesignVariable
boolean TradeStudyPlugIn::ITradeStudy3JobManager::isDesignVariable(VARIANT which)
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
boolean TradeStudyPlugIn::ITradeStudy3JobManager::isInput(VARIANT which)
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
void TradeStudyPlugIn::ITradeStudy3JobManager::newJob(long numRuns)
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
void TradeStudyPlugIn::ITradeStudy3JobManager::clear()
Clear out the current job and all variables.
Return type: void
Function addVariable
void TradeStudyPlugIn::ITradeStudy3JobManager::addVariable(BSTR equation, BSTR displayName, boolean isInput)
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
void TradeStudyPlugIn::ITradeStudy3JobManager::setInput(long runIndex, VARIANT which, VARIANT value)
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
void TradeStudyPlugIn::ITradeStudy3JobManager::setRunInputs(long runIndex, SAFEARRAY(VARIANT) values, [optional] SAFEARRAY(VARIANT) which)
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
void TradeStudyPlugIn::ITradeStudy3JobManager::setVariableInputs(VARIANT which, SAFEARRAY(VARIANT) values, [optional] SAFEARRAY(long) runIndices)
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
ITradeStudy3JobResult * TradeStudyPlugIn::ITradeStudy3JobManager::runJobAsync()
Execute the job.
Returns:
The result of the job, which will be populated in real-time.
Return type: ITradeStudy3JobResult *
Function getMetaDataProvider
IVariableMetaDataProvider * TradeStudyPlugIn::ITradeStudy3JobManager::getMetaDataProvider()
Get the metadata provider for this job manager.
Return type: IVariableMetaDataProvider *