Vehicles.sim
The vehicles.sim file contains the VPT_Vehicle device that would be
used for external stimuli. This device is used as the interface between
the file "traffic.dat" generated by the Scenario Generator (scengen)
tool, the Human Factors models and the WinFrame 3D (WF3D)
visualization tool.
Waypoints
This device reads the waypoints of the moving vehicles and their
associated times and displays them using a "socket'' interface to WF3D.
The movements are also communicated to the Human Factors model by
calling the "start_track" function.
The file "traffic.dat" contains information in XML format about each
vehicle. It contains the vehicle id, the type of vehicle (whether it is
of type 'surface, air or space' and whether it is of type 'friend,
hostile or unknown'), the name of the track and waypoints defined by x,
y, z positions and their time.
The "start_track" function called by the vehicles.sim model for each
new vehicle track has the following format:
void start_track(float *xx, float *yy, float *ss, int n, char *class,
int id);
where:
'xx' and 'yy' are pointers to arrays containing the x and
y coordinates of the waypoints.
Only two dimensions are currently used
for this interface.
'ss' is a pointer to the array containing the derived vehicle
speeds between waypoints.
'n' is the number of waypoints or size of the arrays.
'class' is a character string defining the vehicle type.
'id' is the vehicle ID.
The actual implementation of this function is application dependent and
is to be coded by the user. It's purpose it to modify the model
behavior by changing state variables defined by the application user or
to inject new workload tokens into the model Task Nodes.
External Events
The "traffic.dat" file may also contain a listing, in XML format, of
external events that may be used by the application code to trigger new
workload tokens at various points in the Human Factors work flow graph
or to affect other functions or behaviors of the model. The listing
contains information about each event ID, event name, event type, event
parameters and the time for triggering the event. The application user
will have routines with the same names as the event names which will
define the action to be taken. Definition of this function format is
TBD.
Generating new external workload tokens
New workload tokens are injected by the VPT_vehicle as new waypoint
tracks or events are generated. The user functions will use the "start"
function to inject tokens to desired workflow task nodes. The function
has the following format:
void start( int taskno, int tagno );
where:
taskno - is the task ID of the node to receive the token.
tagno - is a unique token ID that is assigned by the user
function.