Description Usage Arguments Value See Also Examples
The validAgenObject
function checks whether an object of class
Agent
is a valid object. An object of the Agent-class
is valid when:
(object@velocity)^2 ≤ 100.0
(in this case TRUE is returned), otherwise the message "The velocity is out of bounds." will appear.
1 | validAgentObject(object)
|
object |
An object of class |
TRUE or an error message.
Agent, Agent-class
,
initialize,Agent-method
1 2 3 4 5 6 7 8 | a <- new("Agent")
print(a)
a <- initialize(a,
location = c(1.23, 10.5),
velocity = c(5 * sqrt(2), 5 * sqrt(2)),
active = FALSE)
validAgentObject(a)
print(a)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.