test.problem-class: Class "test.problem"

test.problem-classR Documentation

Class "test.problem"

Description

The class contains a test problem including domain definition and reference solution. Generally objects from the class facilitate easy testing of PSO with various parameters.

Objects from the Class

Objects can be created by calls of the form new("test.problem", ...), but the convenience constructer test.problem is the usual approach.

Slots

name:

The name of the test problem. Object of class "character".

f:

Function to be minimized. Object of class "function".

grad:

Gradient of f. Only used with BFGS for the local search. Object of class "function".

n:

Problem dimensionality. Object of class "integer".

maxf:

Maximal number of function evaluations to use. Object of class "integer"

objective:

The absolute tolerance when running PSO. Object of class "numeric".

ntest:

The number of tests to perform. Object of class "integer".

lower:

The lower bounds. Object of class "numeric".

upper:

The upper bounds. Object of class "numeric".

Methods

psoptim

signature(par = "test.problem", fn = "missing", gr = "missing",
lower = "missing", upper = "missing"): for running PSO on the test problem. See psoptim-methods for details.

show

signature(object = "test.problem"): descriptive information of the test problem. See show-methods for details.

See Also

test.problem.

Examples

test.problem("rast")
test.problem("rast",10) # modified for 10 repetitions.

test.problem("para")

pso documentation built on April 12, 2022, 5:06 p.m.