示例#1
0
文件: Genetic.cs 项目: kesre/E190Q
            // Simulate reproduction of two different organism
            public Organism Crossover(Organism parent2)
            {
                Organism ret = new Organism(
                    (getKpho() + parent2.getKpho()) / 2,
                    (getKa() + parent2.getKa()) / 2,
                    (getKb() + parent2.getKb()) / 2,
                    (getKp() + parent2.getKp()) / 2,
                    (getKi() + parent2.getKi()) / 2,
                    (getKd() + parent2.getKd()) / 2,
                    mutationFactor_);

                ret.Stabilize();
                return ret;
            }