Description Usage Format Details Slots Built-in dep functions Make a dep object from a dep function References See Also Examples
Reserve Depletion functions are impelmented specially for Catania's Operant Reserve (Catania, 2005). Catania (2005) and Berg & McDowell (2011) used constants for the reserve depletion. However, we have generalised this to a function. The dep
class is used to set up the dep function, that is, the parameters are not set here. Instead, the dep
will go into a dep_control
object that contains both the dep
as well as its associated parameters.
1 2 3 |
The show
method prints the function that is contained in the dep
object as well as the type of object (i.e. "elemental") and the class (i.e. "dep" ).
In the CAB package, objects from classes like dep
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 dep
in a model.
The show
method for the dep
class can be removed with the function remove.dep.show()
and reinstated with dep.show
.
dep
This will contain a dep function. See examples.
name
The name of the dep
object.
type
This will be elemental
because the dep
is an elemental
object.
A list of the built-in dep functions. The function definitions can be seen by calling the name of the function without brackets. Each function returns the value of the reserve after depletion.
constant_dep_fx
A dep function where the depletion to the reserve is a constant.
f(t) = -d
where d is the amount that the reserve is depleted. Note that the reserve will not be depleted below zero.
dep
object from a dep functionUse the make.dep
function to make a dep
object.
make.dep( dep_fx, name )
dep_fx
A function that represents the dep of interest
name
A character vector specifying the name of your dep
object
Returns a dep
object.
Berg, J. P., & McDowell, J. J (2011). Quantitative, steady-state properties of Catania's computational model of the operant reserve. Behavioural Processes, 87(1), 71-83. https://doi.org/10.1016/j.beproc.2011.01.006
Catania, A. C. (2005). The operant reserve: A computer simulation in (accelerated) real time. Behavioural Processes, 69(2), 257-278. https://doi.org/10.1016/j.beproc.2005.02.009
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.
get.reserve
for a helper function tht gets the reserve value.
1 2 3 4 | # Look at the definition of the "constant_dep_fx" dep function
constant_dep_fx
# Make a dep object out of the "constant_dep_fx" dep function
constant_dep = make.dep( dep_fx = constant_dep_fx, name = "constant_dep" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.