bbo-methods {bbo}R Documentation



Methods for bbo objects.


## S3 method for class 'bbo'
summary(object, ...)
## S3 method for class 'bbo'
plot(x, plot.type = c("itersAvg", "itersBestValue"), ...) 



an object of class bbo; usually, a result of a call to bbo.


an object of class bbo; usually, a result of a call to bbo.


should we plot the best member at each iteration, the best value at each iteration or the intermediate populations?


any additional arguments to be passed to plot function


Members of the class bbo have a plot method that accepts the argument plot.type. plot.type = "itersAvg" results in a plot of the parameter values that represent the lowest value of the objective function at each generation. plot.type = "itersBestValue" plots the best value of the objective function each generation.

A summary method also exists and returns the best parameter vector (habitat), the best value of the objective function, average cost of all habitats in the population at each iteration, best habitat at each iteration and the cost of the best habitats.


Further details and examples of the R package bbo can be found look at the package's vignette by typing vignette("bbo").

Please cite the package in publications. Use citation("bbo").


For package bbo: Sarvesh Nikumbh<> Maintainer: Sarvesh Nikumbh<>

For BBO method: Prof. D. Simon, Cleveland State University, Ohio.


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

See Also

bbo and bbo.control.


        ## --------------------
        ## 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 )

        sample.output.of.bbo <- bbo(Rosenbrock, -5, 5, 
					DisplayFlag = FALSE, 
					control = bbo.control(pMutate = 0.4, 
								numVar = 2, 
								popSize = 50, 
								KEEP = 5, 
								maxGen = 20))

	## print the output information

	## plot
	bbo:::plot.bbo(sample.output.of.bbo, plot.type = "itersBestValue")

[Package bbo version 0.2 Index]