DEoptim-methods           package:DEoptim           R Documentation

_D_E_o_p_t_i_m-_m_e_t_h_o_d_s

_D_e_s_c_r_i_p_t_i_o_n:

     Methods for DEoptim objects.

_U_s_a_g_e:

     ## S3 method for class 'DEoptim':
     summary(object, ...)
     ## S3 method for class 'DEoptim':
     plot(x, plot.type = c("bestmemit","bestvalit"), ...)

_A_r_g_u_m_e_n_t_s:

object, x: an object of class 'DEoptim'; usually, a result of a call to
          'DEoptim'.

plot.type: Should we plot the best member at each iteration or the best
          value at each iteration?

     ...: further arguments passed to or from other methods.

_A_u_t_h_o_r(_s):

     David Ardia.

_E_x_a_m_p_l_e_s:

       ## Rosenbrock Banana function
       Rosenbrock <- function(x){
       x1 <- x[1]
       x2 <- x[2]
       100 * (x2 - x1 * x1)^2 + (1 - x1)^2
       }

       lower <- c(-10,-10)
       upper <- -lower
       r <- DEoptim(Rosenbrock, lower, upper)
       summary(r) ## print summary of the DEoptim object
       
       par(mfrow = c(1,2))
       plot(r, type = 'b') ## plot the best members
       plot(r, plot.type = "bestvalit", type = 'b', col = 'blue') ## and the best values

