views:

1125

answers:

3

I looking into options for a linear and non-linear programming (optimization) framework.

Requirements are:

  1. Support linear and non-linear programming problems with approx. 100-1000 variables and up to about 1000 constraints (I gather that is pretty simple). The non-linear problems have constraints involving multiplication or division of multiple variables - nothing more complicated than that.

  2. Integrates well with MS environments (SQL Server, MS Access, .NET, Excel)

  3. Nice to have would be support for ad hoc problem definition (i.e. some sort of scripting language or support for defining and solving the problem in an Excel front end)

  4. I would use Excel alone but I also need the ability to interface to the solver programatically (.NET environment) for the bigger problems.

For programmatic access I was intending to develop an abstracting interface to the solver (so we could change solvers if ever needed). Then I stumbled into MS Solver Foundation (http://code.msdn.microsoft.com/solverfoundation) which already has this interface. I am wondering if it fits the bill with respect to our other requirements and what opinion users have of it.

A: 

Based on your listed requirements, it looks like Microsoft Solver Foundation meets everyone of your requirements and then some. Read the "What Is Solver Foundation?" document on the Solver Foundation site. It mentions Linear programming, non-linear programming, Develop in .NET, can use in Excel, Solver Foundation also comes with a Microsoft Office Excel add-in to provide a complete modeling environment in a familiar interface.

David Glass
I tried Microsoft Solver Foundation but it doesn't support non-linear problems.
Canoehead
A: 

I've tried Solver Foundation on a problem I tried (unsuccessfully) to solve in the past, and cracked it in 2 days, including learning of Solver API. Solver performance is great, and SFS (Solver Foundation Services) API is AWESOME.

Sergey Aldoukhov
+3  A: 

Well it turns out Microsoft Solver Foundation does not support non-linear programming. As of Jan 2010, the team's official word on this is that they are considering it but that it is not in their immediate plans.

So I have settled on AMPL as the modelling language interface and KNITRO for the solver algorithm. KNITRO looks good because it apparantly consists of three algorithms in one (2 variants of the Interior Point Method and 1 of Active Set method). See also the Wikipedia page for KNITRO.

I settled on AMPL and KNITRO after trying out evaluation versions of both on an excellent web portal apparently funded by the US National Science Foundation and US Dept of Energy at the US Argonne National Laboratory called NEOS. NEOS provides a web interface for uploading your mathematical model using AMPL or GAMS (and for some solvers, a few others) and then getting your results back via a results web page and by email. There is supposedly an email interface for submitting problems but I wasn't successful in getting that to work.

Now, all this costs money. KNITRO and AMPL are commercial products. In the end the solution will cost about $8000 US. Not cheap. If you are looking for free solutions I think the options are pretty much limited to IPOPT for the solver (which I also tried on NEOS and found that it worked well but I was not able to select it because of other non-technical reasons) and forgoing the AMPL interface. You can set up your problem via IPOPT's API. Unlike Micrsoft Solver Foundation's API though, the IPOPT interface is a bit more complicated and, most challenging of all, it requires that your calling application implement callbacks that compute first (and, possibly, second) derivatives of your model's non-linear equations. Modelling language interfaces (like AMPL) take care of this for you because they are able to compute symbolic derivatives from all the equations written in their language.

Canoehead