|COGENT Version 2.3 Help|
Data sources are generally used to feed fixed messages to a model at fixed stages of processing. Their usual function is to act as input devices, where they can feed a stream of input to the model. This input stream consists of a list of messages. Any Prolog term can be passed as a message, so data sources can be used to feed information of arbitrary complexity into a model. Data sources can also send multiple messages on a single cycle (including messages to different boxes). Thus, they can be used to trigger rules in a process or to add elements to a buffer.
As with all COGENT objects, there is no limit to the number of data sources you can have in one model, and they will all behave as independent devices.
The initial contents of a data source are specified by selecting the Input Data page of the box's notebook and then selecting data items from the palette of buttons at the foot of the Input Data page and dropping them into the main canvas on the Input Data page. Once placed on the canvas, they may be edited and manipulated by right-clicking on them and selecting appropriate actions from the menu that pops up. Alternatively, double clicking on a data item will open the data editor on the item.
All data sources have the following property which control their precise behaviour:
Initialise (possible values: Each Trial/Each Block/Each Subject/Each Experiment/Each Session;
default: Each Trial)
This property determines the timing of data source initialisation. When the value is Each Trial, the data source will automatically initialise itself at the beginning of each trial. When the value is Each Block, initialisation will only occur at the beginning of each block. Hence, element may remain in the data source after the first trial for presentation on subsequent trials. Analogous comments apply when the initialisation level is set at each subject, experiment or session.
The editor associated with data source elements allows arbitrary sets of messages to be associated with each cycle. Figure 1 provides an illustration.
As with all COGENT term editors, the top line of the data element editor contains a widget which allow the user to specify a comment to associate with the data element as well as buttons for applying edits and closing the editor. The lower panel of the editor is for specifying the the input data for a particular processing cycle.
Beneath the Add Element button of the editor is a menu of element types. This menu has options for each type of message that is valid given the arrows currently leaving the data source. For example, if a data source has a send arrow to a buffer, then the options will allow adding, deleting and clearing of buffers. If an arrow also leads from the source to a process, then an option for sending to a process will also be included.
If you select an option from Add Element a new line of widgets will be created on the editor describing a schematic message of the appropriate form. (For example, selecting Add will create a schematic add message.) The precise widgets that appear depend on the type of message, but typically include a small button at the beginning of the line (hiding a menu of operations which will apply to the whole line), an indication of the message type (e.g., add), a field to specify the message content (as a Prolog term) and a target for that message. If, given the arrows from the data source, there is only one possible target, then its name will be automatically inserted. Otherwise the target will be indicated by ??? but a menu button will allow selection between all possible targets.
Add Element may be used to add any number of elements to a data source, and the functions concealed beneath the buttons at the beginning of each line of widgets may be used to further edit (or even delete) the corresponding message.
|COGENT Version 2.3 Help|