class.food_duration: Food Duration Function class

Description Usage Format Details Slots Built-in event functions Make an food_duration object from a Food Duration function See Also Examples

Description

Food Duration functions are general functions for representing the duration of reinforcement.

Usage

1
2
3

Format

The show method prints the function that is contained in the food_duration object as well as the type of object (i.e. "elemental") and the class (i.e. "food_duration" ).

Details

In the CAB package, objects from classes like food_duration 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 food_duration in a model.

The show method for the food_duration class can be removed with the function remove.food_duration.show() and reinstated with food_duration.show.

Slots

food_duration

This will contain a Food Duration function. See examples.

name

The name of the food_duration object.

type

This will be elemental because the food_duration is an elemental object.

Built-in event functions

A list of the built-in event functions. The function definitions can be seen by calling the name of the function without brackets. Each function returns the time after the food delivery.

constant_food_duration( food_duration, time )

Food duration is a fixed constant.

Make an food_duration object from a Food Duration function

Use the make.food_duration function to make a food_duration object.

Usage

make.food_duration( food_duration_fx, name )

Arguments

food_duration_fx

A function that represents the Food Duration of interest

name

A character vector specifying the name of your food_duration object

Value

Returns a food_duration object.

See Also

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.

Examples

1
2
3
4
5
# Make a food_duration object
# Look at the definition of the "constant_food_duration" Food Duration function
constant_food_duration
# Make a food_duration object out of the "constant_food_duration" Food Duration function
food_duration = make.food_duration( food_duration_fx = constant_food_duration, name = "food_duration" )

Don-Li/CAB_original documentation built on May 6, 2019, 2:53 p.m.