Free optimization library in C#

Here are a few free and open source c# implementrions

  • Nelder Mead Simplex implementation [Alternate Link]
  • Numerical provides a variety of algorithms including:
    • Chromosome Manager
    • Genetic Optimizer
    • Hill Climbing Optimizer
    • Maximizing Point
    • Maximizing PointFactoy
    • Maximizing Vector
    • Minimizing Point
    • Minimizing Point Factory
    • Minimizing Vector
    • Multi Variable General Optimizer
    • Multi Variable Optimizer
    • One Variable Function Optimizer
    • Optimizing Bracket Finder
    • Optimizing Point
    • Optimizing Point Factory
    • Optimizing Vector
    • Simplex Optimizer
    • Vector Chromosome Manager
    • Vector Genetic Optimizer
    • Vector Projected Function
  • DNAnalytics
    • Done as both a pure managed solution and as a thin wrapper over the Intel unmanaged code.
    • is being merged into MathNetNumerics

More can be found at this list

Note that optimizers frequently benefit from the more extreme code (or assembly) optimizations that are not really possible in pure managed c#. IF serious speed is a concern then targeting an unmanaged implementation like NAG or MOSEK may well provide significant benefits that outweigh the hassle of making the data accessible to the unmanaged API (pinning the managed buffer or using memory mapped files for example)


One option is Microsoft Solver Foundation, also has an express edition


There do seem to be many different optimization libraries for C#. This one appears to be the most popular, however.

They do offer a trial version, so you can verify that it will work for your particular situation before purchasing.