Add progression and new method of selection/mutation/crossover

This commit is contained in:
2025-07-11 23:38:22 +07:00
parent b21b0a342c
commit cebbeff887
13 changed files with 444 additions and 69 deletions

View File

@@ -20,6 +20,8 @@ namespace Managing.Infrastructure.Databases.MongoDb.Collections
public int Generations { get; set; }
public double MutationRate { get; set; }
public GeneticSelectionMethod SelectionMethod { get; set; }
public GeneticCrossoverMethod CrossoverMethod { get; set; }
public GeneticMutationMethod MutationMethod { get; set; }
public int ElitismPercentage { get; set; }
public double MaxTakeProfit { get; set; }
public List<IndicatorType> EligibleIndicators { get; set; } = new();

View File

@@ -209,13 +209,18 @@ public static class MongoMappers
Generations = dto.Generations,
MutationRate = dto.MutationRate,
SelectionMethod = dto.SelectionMethod,
CrossoverMethod = dto.CrossoverMethod,
MutationMethod = dto.MutationMethod,
ElitismPercentage = dto.ElitismPercentage,
MaxTakeProfit = dto.MaxTakeProfit,
EligibleIndicators = dto.EligibleIndicators,
BestFitness = dto.BestFitness,
BestIndividual = dto.BestIndividual,
ErrorMessage = dto.ErrorMessage,
ProgressInfo = dto.ProgressInfo
ProgressInfo = dto.ProgressInfo,
BestChromosome = dto.BestChromosome,
BestFitnessSoFar = dto.BestFitnessSoFar,
CurrentGeneration = dto.CurrentGeneration
};
}
@@ -239,13 +244,18 @@ public static class MongoMappers
Generations = geneticRequest.Generations,
MutationRate = geneticRequest.MutationRate,
SelectionMethod = geneticRequest.SelectionMethod,
CrossoverMethod = geneticRequest.CrossoverMethod,
MutationMethod = geneticRequest.MutationMethod,
ElitismPercentage = geneticRequest.ElitismPercentage,
MaxTakeProfit = geneticRequest.MaxTakeProfit,
EligibleIndicators = geneticRequest.EligibleIndicators,
BestFitness = geneticRequest.BestFitness,
BestIndividual = geneticRequest.BestIndividual,
ErrorMessage = geneticRequest.ErrorMessage,
ProgressInfo = geneticRequest.ProgressInfo
ProgressInfo = geneticRequest.ProgressInfo,
BestChromosome = geneticRequest.BestChromosome,
BestFitnessSoFar = geneticRequest.BestFitnessSoFar,
CurrentGeneration = geneticRequest.CurrentGeneration
};
}