Learn R Programming

bbo (version 0.2)

bbo: Biogeography-Based Optimization

Description

Solves global optimization problems via Biogeography-Based Optimization method.

Usage

bbo(fn, lower, upper, DisplayFlag = TRUE, RandSeed, control = bbo.control(), ...)

Arguments

fn
the function to be optimized (minimized).
lower, upper
two vectors specifying scalar real lower and upper bounds on each parameter to be optimized, so that the i-th element of lower and upper applied to the i-th parameter. The implementation searches between lower and
DisplayFlag
TRUE or FALSE, whether or not to display, default is TRUE
RandSeed
random number seed
control
a list of control parameters; see bbo.control.
...
further arguments to be passed to fn

Value

  • The output of the function bbo is a list containing the following elements: prop, a list of control parameters for BBO for the current run:
    • pModify
    • pMutate
    • KEEP
    • popSize
    • maxGen
    • numVar
    • orderDep

    minCost, a list containing the following elements:

    • bestMember: the best set of parameters found.
    • bestValue: the value offncorresponding tobestMember.

    bestHabitat a list containing the following elements:

    • itersBestValue: the best value offnat each iteration.
    • itersBestMember: the best member at each iteration.
    • itersAvg: the average population cost at each iteration.

Details

Given an objective function, this method performs biogeography-based optimization and returns the minimum cost for the given objective function.

References

D. Simon, "Biogeography-Based Optimization", IEEE Transactions on Evolutionary Computation, vol. 12, no. 6, pp. 702-713, December 2008.

See Also

bbo.control for control arguments

Examples

Run this code
## --------------------
	## Rosenbrock function:
	## --------------------
	## It has a global minimum f(x) = 0 at (1,1).  
	## Kindly note that the first parameter passed to the 
	## objective function should be the vector of parameters
	## to be optimized.
	Rosenbrock <- function(x){
	  x1 <- x[1]
	  x2 <- x[2]
	  return(  100 * (x2 - x1 * x1)^2 + (1 - x1)^2 )
  	}

	bbo(Rosenbrock, -5, 5, control = 
		bbo.control(pMutate = 0.4, 
				numVar = 2, 
				popSize = 50, 
				KEEP = 5, 
				maxGen = 20))

Run the code above in your browser using DataLab