Exemple #1
0
        public double[,] BuildModel()
        {
            var precedenceMatrixModel = new PrecedenceMatrixModel(Random, ParameterSet);

            for (int i = 0; i < Chromosomes.Count; i++)
            {
                precedenceMatrixModel.Add(Chromosomes[i]);
            }
            return(precedenceMatrixModel.PrecedenceMatrix);
        }
Exemple #2
0
        public List <IChromosome> GetSamples()
        {
            var result = new List <IChromosome>();

            var precedenceMatrixModel = new PrecedenceMatrixModel(Random, ParameterSet);

            for (int i = 0; i < Chromosomes.Count; i++)
            {
                precedenceMatrixModel.Add(Chromosomes[i]);
                var chromosome = precedenceMatrixModel.GetSample();
                result.Add(chromosome);
            }

            return(result);
        }
Exemple #3
0
        public PermutationOperatorBenchmarks()
        {
            var conflictDetectors = new List <IConflictDetector>()
            {
                AllRightConflictDetector.Instance
            };
            var chromosomeCreator = new PermutationRandomCreator(Size, Random, conflictDetectors);

            PrebuildModel = new PrecedenceMatrixModel(Random, ParameterSet, null);

            for (int i = 0; i < Count; i++)
            {
                Chromosomes.Add(chromosomeCreator.Create());
            }

            PrebuildModel.Add(chromosomeCreator.Create());
        }