Skip to content

Action Schema ​

txt
EMRALD_Model#/definitions/Action
AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenForbiddennoneEMRALD_JsonSchemaV3_4.json*

Action Type ​

object (Action)

Action Properties ​

PropertyTypeRequiredNullableDefined by
idstringOptionalcannot be nullEMRALD_Model
objTypeNot specifiedRequiredcannot be nullEMRALD_Model
namestringRequiredcannot be nullEMRALD_Model
descstringRequiredcannot be nullEMRALD_Model
actTypestringRequiredcannot be nullEMRALD_Model
mainItembooleanRequiredcannot be nullEMRALD_Model
mutExclbooleanOptionalcannot be nullEMRALD_Model
newStatesarrayOptionalcannot be nullEMRALD_Model
scriptCodestringOptionalcannot be nullEMRALD_Model
variableNamestringOptionalcannot be nullEMRALD_Model
codeVariablesarrayOptionalcannot be nullEMRALD_Model
useDistributionbooleanOptionalcannot be nullEMRALD_Model
distTypestringOptionalcannot be nullEMRALD_Model
parametersarrayOptionalcannot be nullEMRALD_Model
sim3DMessagestringOptionalcannot be nullEMRALD_Model
extSimstringOptionalcannot be nullEMRALD_Model
sim3DVariablestringOptionalcannot be nullEMRALD_Model
openSimVarParamsbooleanOptionalcannot be nullEMRALD_Model
sim3DModelRefstringOptionalcannot be nullEMRALD_Model
sim3DConfigDatastringOptionalcannot be nullEMRALD_Model
simEndTimestringOptionalcannot be nullEMRALD_Model
makeInputFileCodestringOptionalcannot be nullEMRALD_Model
exePathstringOptionalcannot be nullEMRALD_Model
ExeFromPreCodebooleanOptionalcannot be nullEMRALD_Model
useProjPathExeWorkingDirbooleanOptionalcannot be nullEMRALD_Model
processOutputFileCodestringOptionalcannot be nullEMRALD_Model
formDataobjectOptionalcannot be nullEMRALD_Model
templateobjectOptionalcannot be nullEMRALD_Model
returnProcessstringOptionalcannot be nullEMRALD_Model
changeLogarrayOptionalcannot be nullEMRALD_Model
raTypestringOptionalcannot be nullEMRALD_Model
updateVariablesarrayOptionalcannot be nullEMRALD_Model
requiredbooleanOptionalcannot be nullEMRALD_Model

id ​

Optional, internal use only.

id

  • is optional

  • Type: string

  • cannot 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: string

  • cannot be null

  • defined in: EMRALD_Model

name Type ​

string

desc ​

User entered description of the action

desc

  • is required

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

desc Type ​

string

actType ​

The type of action

actType

  • is required

  • Type: string

  • cannot 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:

ValueExplanation
"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: boolean

  • cannot 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: boolean

  • cannot 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

newStates Type ​

object[] (NewState)

scriptCode ​

Optionsl. Script code to be executed if the action type has a script

scriptCode

  • is optional

  • Type: string

  • cannot 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: string

  • cannot 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: boolean

  • cannot 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: string

  • cannot 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:

ValueExplanation
"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

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: string

  • cannot 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: string

  • cannot 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: string

  • cannot 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: boolean

  • cannot 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: string

  • cannot 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: string

  • cannot 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: string

  • cannot 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: string

  • cannot 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: string

  • cannot 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: boolean

  • cannot be null

  • defined in: EMRALD_Model

ExeFromPreCode Type ​

boolean

ExeFromPreCode Default Value ​

The default value is:

json
false

useProjPathExeWorkingDir ​

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: boolean

  • cannot be null

  • defined in: EMRALD_Model

useProjPathExeWorkingDir Type ​

boolean

useProjPathExeWorkingDir Default Value ​

The default value is:

json
false

processOutputFileCode ​

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: string

  • cannot be null

  • defined in: EMRALD_Model

processOutputFileCode Type ​

string

formData ​

Form data used by the MAAP form

formData

formData Type ​

object (MAAPFormData)

template ​

Optional. For action type atRunExtApp. It is used for custom app form.

template

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: string

  • cannot be null

  • defined in: EMRALD_Model

returnProcess Type ​

string

changeLog ​

Type of the diagram.

changeLog

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: string

  • cannot be null

  • defined in: EMRALD_Model

raType Type ​

string

updateVariables ​

Used for custom form, variables used in the form.

updateVariables

  • is optional

  • Type: array

  • cannot 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: boolean

  • cannot be null

  • defined in: EMRALD_Model

required Type ​

boolean