User Functions

The CSIM Human Factors modeling tool can be customized to specific applications by allowing the insertion of user functions. User function names may be defined as attributes in each of the task node instances. User functions may be defined for each of the following task node attributes:
  • EnterEffect
  • DepartEffect
  • QPriority
  • Release_Conditions
  • BeginEffect
  • MeanTime
  • Std_Deviation
  • LaunchEffect
  • EndEffect
  • portname
The user defines the function name for each used attribute of each task node. The format is:
attribute = function_name

For example:
EnterEffect = EnterTaskQ101

The actual function is defined by the user in the C language and is placed in the user_functions.sim file. The use of each of the functions is described in the respective attribute definition of the Task Node model description.

The user_functions.sim file is the centralized place for defining user functions, variables or states and their initialization that are specific to the application. It may contain all the user functions and definitions within the file or it may be used to organize and include other user files that are divided by functional identity. All code within the file's DEFINE_GLOBAL/END_DEFINE_GLOBAL block uses conventional C code.

This user_functions.sim file would typically include a file defining application specific state variables and their initialization, a file containing user functions that are invoked by the attributes having the same function names that are defined by the CSIM GUI for each Task Node, and a file that defines functions that are used when vehicles are moved or events occur as a result of external stimuli as defined by CSIM's vehicles.sim model.