Skip to content
All library documents

Choosing .NET Optimization Libraries for Quantitative Problems

Article Quant Q&A · Author: Zarbouzou

Summary

The discussion surveys optimization software that C# developers might use instead of implementing algorithms themselves. Suggestions include general numerical libraries and tools for linear, integer, and mixed optimization, along with options to call compiled MATLAB routines or use a commercial numerical library with .NET support.

The replies do not compare these tools through benchmarks or a worked financial application. One answer notes that linear and mixed problem solvers address particular optimization classes, while another asks the original poster to clarify the problem type and license requirements. The question mentions a semidefinite program, but the responses do not establish which suggested package can solve that problem. Users therefore need to check solver capabilities, interface support, and licensing against their own requirements; the recommendations are mostly personal suggestions rather than verified evaluations.

Key ideas

  • Optimization libraries differ in the problem classes they support.
  • Linear, integer, and mixed optimization tools may not handle semidefinite programs.
  • C# users can consider .NET libraries or call compiled numerical routines.
  • License terms and the specific optimization formulation affect library choice.

Tags

Full text
# What .NET library can I use to solve optimization problems?


# What .NET library can I use to solve optimization problems?












I'm working with C# and I start being bored writing optimization algorithm.

Do you know any free library containing this sort of algorithms?

In particular I'm currently working with Semidefit program.

## Answer by SRKX (score 10)

https://quant.stackexchange.com/a/973

I haven't had the time to try them personally, but if I were you I'd try The Solver Foundation or maybe you can find something useful within these libraries.

What I did was to compile a MATLAB algorithm and used the produced DLL.

UPDATE: I read yesterday in the Wilmott Magazine that the NAG Library is also available for .Net now. Again, I haven't used it and I don't know if you're looking for something open-source, but apparently this one is good.

## Answer by RockScience (score 8)

https://quant.stackexchange.com/a/977

You can use https://projects.coin-or.org/Clp

Other options: http://sourceforge.net/projects/lpsolve/ and in R http://cran.r-project.org/web/packages/lpSolve/index.html

They all solve pure linear, integer and mixed problems

## Answer by Karol J. Piczak (score 6)

https://quant.stackexchange.com/a/976

You can also have a look at ALGLIB or DotNumerics.

It would help though if you clarified what kind of optimization problem you have or what kind of algorithm you look for. And if by free you mean GPL or something more like MIT?

## Answer by Brian B (score 4)

https://quant.stackexchange.com/a/980

The GNU Scientific Library or GSL contains a few different varieties of optimizer. They work pretty well and have a relatively good interface. Their derivative-aware routines are a bit lacking in bounded optimization features compared to NAG, though.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.