Learn R Programming

galgo (version 1.4)

addSolutions.BigBang: Adds user-built or external chromosomes as solutions

Description

Adds chromosomes as solutions. This method is used to build BigBang objects from an external source of chromosomes/solutions. These solutions were obtained from any other process. This can be used for simulations, verifications and comparisons.

Usage

# S3 method for BigBang
addSolutions(no, chrs, gen=NULL, sol=NULL, fit=NULL, ...)

Arguments

no

BigBang Object

chrs

Chromosomes to add. It is assumed to be a list. If data frame or matrix are provided, rows are considered as chromosomes and columns as genes/variables.

gen

Generation in which each solution was reached (numeric vector). Default to NULL, which is interpreted as 1.

sol

Vector of flags indicating whether each chromosome is a solution (1=TRUE, 0=FALSE). Default to NULL, which is interpreted as 1.

fit

Vector of fitness of each chromosome (between 0 and 1). Default to NULL, which is used to compute the fitness using internal configuration of the BigBang/Galgo objects.

Value

Returns nothing. However, the original BigBang object has been modified adding the solutions.

References

Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675

See Also

For more information see BigBang.

Examples

Run this code
# NOT RUN {
   #bb is a BigBang object
   
# }
# NOT RUN {
   bb
   plot(bb)
   addSolutions(bb, chrList)
   plot(bb) # accumulated solutions
   
# }
# NOT RUN {
 
# }

Run the code above in your browser using DataLab