Exemplo n.º 1
0
        /// <summary>
        /// NATURAL FUNCTION, COMPULSORY
        /// </summary>
        /// <returns></returns>
        public override IChromosome CreateChromosome()
        {
            //no junk? last argument
            DroneChromosome c = new DroneChromosome(SIZE, ProblemData.Length, 0);

            return(c);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a clone.
        /// </summary>
        /// <returns>The chromosome clone.</returns>
        public override IChromosome Clone()
        {
            DroneChromosome c = base.Clone() as DroneChromosome;

            c.numberOfGenes = this.numberOfGenes;
            c.maxEmpty      = this.maxEmpty;
            return(c);
        }