Free optimization library in C#

Graviton picture Graviton · Jul 31, 2009 · Viewed 20.4k times · Source

Is there any optimization library in C#?

I have to optimize a complicated equation in excel, for this equation there are a few coefficients. And I have to optimize them according to a fitness function that I define. So I wonder whether there is such a library that does what I need?

Answer

ShuggyCoUk picture ShuggyCoUk · Aug 1, 2009

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)