Skip to content

A .NET (Core)-based implementation of the Differential Evolution optimization heuristic with multi-objective extensions. The implementation is based on a generalized Evolutionary Algorithm framework, which is included in this repository.

Notifications You must be signed in to change notification settings

simontjell/EvolutionaryAlgorithms

Repository files navigation

Introduction

This repository contains both a generic framework for implementing evolutionary algorithms (src/EvolutionaryAlgorithm) and an example of a concrete implementation of the Differential Evolution algorithm (src/DifferentialAlgorithm) with extensions supporting optimization of multi-objective minimization problems.

Benchmark problems

The tests/DifferentialEvolution.Tests/OptimizationProblems contains a small collection of benchmark problems that are used for testing the implementation but also serve as good examples of how the framework is applied on an optimization problem.

An optimization problem is specified in code by implementing a subclass of the abstract OptimizationProblem class. The subclass implements three concrete aspects of an optimization problem:

  1. Creation of random individuals (CreateRandomIndividual). This is only necessary to override if the range of one or more of the genes differs from the default interval ([0...1]).
  2. Calculation of fitness values for individuals (CalculateFitnessValues) returning a list containing one fitness value per optimization objective.
  3. An optional feasibility predicate (IsFeasible). If not overridden, all individuals will be considered feasible - i.e., the search space is only limited by the range of the nummeric types used in the algorithm (double).

Building the solution

The current implementation is based on .NET 6 (formerly known as .NET Core). The SDK is found here: https://dotnet.microsoft.com/download/dotnet/6.0.

After installing the SDK, the code is build using the .NET CLI:

dotnet build

Executing the tests

The test optimization problems can be executed by running tests in the project:

dotnet test

Want to help?

Pull requests are very welcome. Some ideas could be:

  • Implementing other optimization algorithms based on the generic framework described above.
  • Performance optimizations
  • Implementing a better scattering measure in the base algorithm class (EvolutionaryAlgorithm)
  • Graphical visualization of optimization runs
  • + all the things I haven't thought of :-)

About

A .NET (Core)-based implementation of the Differential Evolution optimization heuristic with multi-objective extensions. The implementation is based on a generalized Evolutionary Algorithm framework, which is included in this repository.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages