Action Schema
txt
EMRALD_Model#/definitions/Action| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|---|---|---|---|---|---|---|---|
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | EMRALD_JsonSchemaV3_4.json* |
Action Type
object (Action)
Action Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| id | string | Optional | cannot be null | EMRALD_Model |
| objType | Not specified | Required | cannot be null | EMRALD_Model |
| name | string | Required | cannot be null | EMRALD_Model |
| desc | string | Required | cannot be null | EMRALD_Model |
| actType | string | Required | cannot be null | EMRALD_Model |
| mainItem | boolean | Required | cannot be null | EMRALD_Model |
| mutExcl | boolean | Optional | cannot be null | EMRALD_Model |
| newStates | array | Optional | cannot be null | EMRALD_Model |
| scriptCode | string | Optional | cannot be null | EMRALD_Model |
| variableName | string | Optional | cannot be null | EMRALD_Model |
| codeVariables | array | Optional | cannot be null | EMRALD_Model |
| useDistribution | boolean | Optional | cannot be null | EMRALD_Model |
| distType | string | Optional | cannot be null | EMRALD_Model |
| parameters | array | Optional | cannot be null | EMRALD_Model |
| sim3DMessage | string | Optional | cannot be null | EMRALD_Model |
| extSim | string | Optional | cannot be null | EMRALD_Model |
| sim3DVariable | string | Optional | cannot be null | EMRALD_Model |
| openSimVarParams | boolean | Optional | cannot be null | EMRALD_Model |
| sim3DModelRef | string | Optional | cannot be null | EMRALD_Model |
| sim3DConfigData | string | Optional | cannot be null | EMRALD_Model |
| simEndTime | string | Optional | cannot be null | EMRALD_Model |
| makeInputFileCode | string | Optional | cannot be null | EMRALD_Model |
| exePath | string | Optional | cannot be null | EMRALD_Model |
| ExeFromPreCode | boolean | Optional | cannot be null | EMRALD_Model |
| useProjPathExeWorkingDir | boolean | Optional | cannot be null | EMRALD_Model |
| processOutputFileCode | string | Optional | cannot be null | EMRALD_Model |
| formData | object | Optional | cannot be null | EMRALD_Model |
| template | object | Optional | cannot be null | EMRALD_Model |
| returnProcess | string | Optional | cannot be null | EMRALD_Model |
| changeLog | array | Optional | cannot be null | EMRALD_Model |
| raType | string | Optional | cannot be null | EMRALD_Model |
| updateVariables | array | Optional | cannot be null | EMRALD_Model |
| required | boolean | Optional | cannot be null | EMRALD_Model |
id
Optional, internal use only.
id
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
id Type
string
objType
objType
is required
Type: unknown
cannot be null
defined in: EMRALD_Model
objType Type
unknown
objType Constraints
constant: the value of this property must be equal to:
json
"Action"name
referenace name in the model for the action
name
is required
Type:
stringcannot be null
defined in: EMRALD_Model
name Type
string
desc
User entered description of the action
desc
is required
Type:
stringcannot be null
defined in: EMRALD_Model
desc Type
string
actType
The type of action
actType
is required
Type:
stringcannot be null
defined in: EMRALD_Model
actType Type
string
actType Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"atTransition" | |
"atCngVarVal" | |
"at3DSimMsg" | |
"atRunExtApp" |
mainItem
Is this a global item to show up in the global list, If false it showes up in local or all list.
mainItem
is required
Type:
booleancannot be null
defined in: EMRALD_Model
mainItem Type
boolean
mutExcl
Optional. Only one action may be taken so the probability determines if this action is taken vs another in the EventAction list. If false then the probability is used to sample if this action occured and multiple or no actions could happen when the event is triggered.
mutExcl
is optional
Type:
booleancannot be null
defined in: EMRALD_Model
mutExcl Type
boolean
newStates
Optional. If this is a transition action then these are the states that it could be transitioned to.
newStates
is optional
Type:
object[](NewState)cannot be null
defined in: EMRALD_Model
newStates Type
object[] (NewState)
scriptCode
Optionsl. Script code to be executed if the action type has a script
scriptCode
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
scriptCode Type
string
variableName
Optional. For change var value actions, the result of the script is assigned to this variable name reference.
variableName
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
variableName Type
string
codeVariables
Optional. If action has a script, these are the variable name references for variables used in the script. All variables used in script must be in this list.
codeVariables
is optional
Type:
string[]cannot be null
defined in: EMRALD_Model
codeVariables Type
string[]
useDistribution
Optional. For action type atCngVarVal. When true, the new value is sampled from the distribution defined by distType and parameters instead of running scriptCode. Defaults to false (use code) when unset.
useDistribution
is optional
Type:
booleancannot be null
defined in: EMRALD_Model
useDistribution Type
boolean
distType
Optional. For event type of etDistribution this is the type of distribution the user selected.
distType
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
distType Type
string
distType Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"dtNormal" | |
"dtExponential" | |
"dtWeibull" | |
"dtLogNormal" | |
"dtTriangular" | |
"dtGamma" | |
"dtGompertz" | |
"dtUniform" | |
"dtBeta" |
parameters
Optional. For action type atCngVarVal when useDistribution is true, this is the array of distribution parameters. The shape is shared with etDistribution events for convenience, but the timeRate field on each parameter is ignored for atCngVarVal (variable values are unitless raw numbers, not durations).
parameters
is optional
Type:
object[](EventDistributionParameter)cannot be null
defined in: EMRALD_Model
parameters Type
object[] (EventDistributionParameter)
sim3DMessage
Optional. For action type at3DSimMsg, this is the message to be sent to the coupled external simulation.
sim3DMessage
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
sim3DMessage Type
string
extSim
Optional. For action type at3DSimMsg, this is the name of the coupled external sim to send the message to.
extSim
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
extSim Type
string
sim3DVariable
Optional. For action type at3DSimMsg and a sim3DMessage of atCompModify, this is the name of the variable in the external simulation to be modified by the message.
sim3DVariable
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
sim3DVariable Type
string
openSimVarParams
Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this flag indicates that the JSON has the properties for sim3DModelRef, sim3DConfigData, and simEndTime.
openSimVarParams
is optional
Type:
booleancannot be null
defined in: EMRALD_Model
openSimVarParams Type
boolean
sim3DModelRef
Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this is the data defined by the user that is used by the external simulation on startup. Typically a path to a model it need to open.
sim3DModelRef
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
sim3DModelRef Type
string
sim3DConfigData
Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this is the data defined by the user that is used by the external simulation on startup.
sim3DConfigData
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
sim3DConfigData Type
string
simEndTime
Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this is the end simulation time defined by the user that is used by the external simulation on startup.
simEndTime
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
simEndTime Type
string
makeInputFileCode
Optional. For action type atRunExtApp. It is the C# script to be executed and the result strig passed as a parameter to the executable to be run.
makeInputFileCode
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
makeInputFileCode Type
string
exePath
Optional. For action type atRunExtApp. It is the path of the exe to be run. It can be relative to the location of the EMRALD model.
exePath
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
exePath Type
string
ExeFromPreCode
Optional. For action type atRunExtApp. When true, the preprocessor code return string determines the executable to run instead of exePath.
ExeFromPreCode
is optional
Type:
booleancannot be null
defined in: EMRALD_Model
ExeFromPreCode Type
boolean
ExeFromPreCode Default Value
The default value is:
json
falseuseProjPathExeWorkingDir
Optional. For action type atRunExtApp. When true, the executable working directory is the model project path instead of the executable directory.
useProjPathExeWorkingDir
is optional
Type:
booleancannot be null
defined in: EMRALD_Model
useProjPathExeWorkingDir Type
boolean
useProjPathExeWorkingDir Default Value
The default value is:
json
falseprocessOutputFileCode
Optional. For action type atRunExtApp. It is the C# script to be executed after the accociated exe is ran. Typically it reads a result file and script typically returns a string list with +/-[StateName] to shift out or into a state because of the results..
processOutputFileCode
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
processOutputFileCode Type
string
formData
Form data used by the MAAP form
formData
is optional
Type:
object(MAAPFormData)cannot be null
defined in: EMRALD_Model
formData Type
object (MAAPFormData)
template
Optional. For action type atRunExtApp. It is used for custom app form.
template
is optional
Type:
object(Details)cannot be null
defined in: EMRALD_Model
template Type
object (Details)
returnProcess
Optional. For action type atRunExtApp. It is flag to indicate the type of return from the processOutputFileCode. If rtNone then it has no return, othrwise the C# script must return a List of strings with +/-[StateName] to shift out or into a state.
returnProcess
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
returnProcess Type
string
changeLog
Type of the diagram.
changeLog
is optional
Type:
object[](ChangeLogItems)cannot be null
defined in: EMRALD_Model
changeLog Type
object[] (ChangeLogItems)
raType
String for the run application action, only for UI used. Options depend on the custom UI forms made. "code" means default user defined pre and post execution code is used.
raType
is optional
Type:
stringcannot be null
defined in: EMRALD_Model
raType Type
string
updateVariables
Used for custom form, variables used in the form.
updateVariables
is optional
Type:
arraycannot be null
defined in: EMRALD_Model
updateVariables Type
array
required
If this is a template then it indicates the item must exist in the current model before using the template.
required
is optional
Type:
booleancannot be null
defined in: EMRALD_Model
required Type
boolean
