Skip to main content
Definition: ModelCenter/src/ModelCenter.odl (line 3598) Allows you to set up a matrix of runs and runs them in parallel or serial depending on the preferences mode.

Members

Properties

Property wasHalted

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: boolean

Public functions

Function addInput

Adds an input to all runs in the Job Manager. Parameters:
  • name: Variable name.
  • label: Variable label.
Parameters:
  • BSTR name
  • BSTR label
Return type: void

Function setInput

Sets the value for a specified input variable for a specified run. Parameters:
  • run: Index of the run this is to apply to (0-based index).
  • name: Name of the specified variable.
  • value: Value for the specified variable to run for this specified run.
Parameters:
  • long run
  • BSTR name
  • BSTR value
Return type: void

Function addOutput

Adds an output to all runs in the Job Manager. Parameters:
  • name: Variable name.
  • label: Variable label.
Parameters:
  • BSTR name
  • BSTR label
Return type: void

Function getValidateAll

Whether or not the Job Manager will validate everything. Returns: yes(TRUE) or no(FALSE). Return type: boolean

Function setValidateAll

Sets whether or not the Job Manager will validate everything. Parameters:
  • flag: yes(TRUE) or no(FALSE).
Parameters:
  • boolean flag
Return type: void

Function getNumRuns

Gets the number of runs currently in the job matrix. Returns: The number of runs. Return type: long

Function setNumRuns

Sets the number of runs that will take place in this job matrix. Parameters:
  • numRuns: Number of runs.
Parameters:
  • long numRuns
Return type: void

Function submit

Causes the run matrix to begin. Parameters:
  • dataCollector: IDispatch* to an IDataCollector object.
  • description: The type of trade study to be run.
  • fireAndForget: Flag for whether fire-n-forget is enabled
Parameters:
  • IDispatch * dataCollector
  • [optional] VARIANT description
  • [optional] VARIANT fireAndForget
Return type: void

Function waitForJobCompletion

Waits until the current run matrix has completed before continuing. Return type: void

Function addRerun

The job manager may alternately be used to re-run runs out of an existing Data Collector or Data Explorer object. Simply call this function for each run which should be run. When using the Job Manager in this form, do not use addInput, addOutput, setInput or setNumRuns. Parameters:
  • run: 0 based run number to add to the re-run list.
Parameters:
  • long run
Return type: void

Function halt

Halt the running job in the Job Manager. Parameters:
  • halt: Whether to halt the job or not.
Parameters:
  • boolean halt
Return type: void

Function getNumInputs

Retrieve the number of inputs in the job. Returns: The number of inputs. Return type: long

Function getNumOutputs

Retrieve the number of outputs in the job. Returns: The number of outputs. Return type: long

Function getInput

Get the specified input. Parameters:
  • index: The index of the input to fetch.
Returns: The input. Parameters:
  • long index
Return type: BSTR

Function getOutput

Get the specified output. Parameters:
  • index: The index of the output to fetch.
Returns: The output. Parameters:
  • long index
Return type: BSTR

Function getInputLabel

Get the label of the specified input. Parameters:
  • index: The index of the input to fetch.
Returns: The label of the input. Parameters:
  • long index
Return type: BSTR

Function getOutputLabel

Get the label of the specified output. Parameters:
  • index: The index of the output to fetch.
Returns: The label of the output. Parameters:
  • long index
Return type: BSTR

Function getNumThreads

Get the number of threads to use when running in parallel. Returns: The number of threads to use Return type: long

Function getRunInParallel

Determine whether or not to run the job in parallel. Returns: true if the job is to be ran in parallel false otherwise. Return type: boolean

Function setNumThreads

Set the number of threads to use if the job is to be ran in parallel. Parameters:
  • numThreads: the number of threads to use
Parameters:
  • long numThreads
Return type: void

Function setRunInParallel

Tell the job manager to run the job in parallel. Parameters:
  • runInParallel: true if the job is to be ran in parallel, false otherwise
Parameters:
  • boolean runInParallel
Return type: void

Function enableCache

Method to tell the job manager to enable or disable using cache for submitted designs. If you disable the cache, runs may be purged from the cache lookup either immediately or after subsequent runs. Parameters:
  • enable: true if run values could be get from cache, if false, all submitted runs are to be executed.
Returns: Previous setting. Parameters:
  • boolean enable
Return type: boolean

Function clearCache

Method to actively clear job manager’s internal cache of executed runs. Return type: void

Function getRunIndex

Method to get Run Index for the given design from cache. Only works if you’ve been running jobs with the run cache enabled. Parameters:
  • names: array of variable names for the design
  • values: array of values corresponding to the names array
Returns: index of design in data explorer if design found else -1
Parameters:
  • VARIANT names
  • VARIANT values
Return type: long

Function resume

Pick up from the last checkpoint in a data history. If you subsequently pass a data collector, data explorer, or data history to submit(), you should be sure to pass one with the same data history or all restored runs will be lost. Note: this function merely loads the run cache; it does not actually submit any runs. You must still specify the runs to perform and call submit() in order to continue evaluation. Parameters:
  • dataHistory: the Data History to restore from; if null uses the current data history; if non-null this becomes the current data history; you may pass a data explorer or data collector instead
Parameters:
  • IDispatch * dataHistory
Return type: void

Function setCustomMetadata

Add custom metadata to a variable. Parameters:
  • name: Variable name.
  • key: the key of the metadata to add
  • value: the value of the metadata to add.
Parameters:
  • BSTR name
  • BSTR key
  • BSTR value
Return type: void