Description Usage Format Details Slots Built-in Termination functions Make an termination object from a Termination function See Also Examples
Termination functions are general functions for representing the stopping conditions for an experiment.
1 2 3 |
The show method prints the function that is contained in the termination object as well as the type of object (i.e. "elemental") and the class (i.e. "termination" ).
In the CAB package, objects from classes like termination are called 'elemental' objects That is, they comprise a particular element of the simulation without any specified parameter values. 'Control' objects are elemental objects with an associated list of parameter values. Refer to class.DOR for information for putting a termination in a model.
When the termination object is used to contain many termination condtiions, each termination condition should be programmed into a single Termination function that is contained in the termination object. Alternatively, one may define different custom classes to manage each termination condition. For more details on implementing multiple classes for multiple termination conditions, see class.termination.
The show method for the termination class can be removed with the function remove.termination.show() and reinstated with termination.show.
terminationThis will contain a Termination function. See examples.
nameThe name of the termination object.
typeThis will be elemental because the termination is an termination object.
A list of the built-in Termination functions. The function definitions can be seen by calling the name of the function without brackets. Each function returns a logical indicating whether or not the termination condition is met.
time_termination_fx( time, finish_time)Experimental terminates after the set time.
resp_termination_fx( resp, finish_resp)Experiment terminates after set number of responses.
termination object from a Termination functionUse the make.termination function to make a termination object.
make.termination( termination_fx, name )
termination_fxA function that represents the Termination function of interest
nameA character vector specifying the name of your termination object
Returns a termination object.
make.control for making DOR_control objects.
set.custom_elemental for setting custom elemental classes.
make.custom_elemental for making custom elemental objects.
e_show for the function that is called by the show method.
class.elemental for the parent elemental class.
1 2 3 4 5 | # Terminate the experiemnt at 3000 responses
# Look at the definition of the "resp_termination_fx" Termination function
resp_termination_fx
# Make a termiantion object out of the "resp_termination_fx" Termination function
resp_termination = make.termination( termination_fx = resp_termination_fx, name = "resp_termination" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.