|
|
I know little about MSF while I have done GAMS modelling for a couple of years. According to my initial understanding, MSF does similiar jobs with GAMS which provides the interface to model mathamtical programming models and link to solve them using various solvers. GAMS is well written and easily to use. I am not sure if MSF has any notable advantages when comparing with GAMS in terms of: 1. model representation 2. computational comparison when using exactly the same solver. 3. compatability with other algorithms such GA SA TS etc. I know it is difficult to model MIP/MINLP models in GAMS while solving them directly using GA and SA so as to do comparison with CPLEX/SBB, does MSF can do that ? 4. there are many models in GAMS model lib so that we can learn not only programming techniques but modeling skills. does MSF can provide more ? 5. I am new to computing while my idea might be stupid. GAMS can not be purly Objected-Oriented. Can MSF smoothly incorporate OO techques inside or even suitable design patterns. thanks
|
|
Edited Mar 7 2009 at 5:00 PM
|
Here my two cents:I would suggest that GAMS and MSF are not really direct competitive products, rather they are complementary, although the both are helping implementing math programming models. GAMS is really targeting large and complex models. It has a fairly complex language with a learning curve, but in return it provides excellent facilities to build really complex models. MSF has a very simple language (OML). Its advantage is it simplicity. Its disadvantage is, well, that it is very simple. When implementing more complex models you will miss some features such as multi-dimensional sets, data-manipulation, debugging facilities, looping constructs, sparse structures, conditional set operations etc. The flip-side is that is simple, easy to learn, and fun to use for implementing smaller or less complex models. The API's are useful for programmers that want to implement small or highly structured models. They are less useful for complex models: it is just too cumbersome to implement very complex models in a general purpose programming language. On the other hand if you have a well-structured model, that needs to be packaged in a larger .NET application, this is of course extremely valuable. (I need to add it is possible to mix the use of OML with the API's, but I believe my argument remains largely intact). GAMS does not offer an API like MSF does (although it has an API for its binary data files). Note that a model can be very large but very structured. In that case a modeling language has less added value than if the model is really complex. GAMS does not have anything to offer for constraint programming (except using a MIP solver), but on the other hand, it has excellent support for (large, sparse) nonlinear models (like automatic differentiation). MSF has a CSP solver built-in, but very limited support for nonlinear programming. 1. model representation: GAMS has complex, powerful language for large, sparse, complex models. MSF has simple OML language and a wealth of API's to develop models against. 2. computational comparison when using exactly the same solver. If you use the same solver, the solution time should be the same. I.e. Gurobi works with GAMS and with MSF, and the same model should solve in the same time. The main difference is model generation time. For large models GAMS is probably faster than OML, but slower than coding the model directly against the API (if you do it right). 3. GAMS does not have GA, SA. Also the typical GAMS models are probably not ideally suited for the majority of these solution strategies. GAMS models have typically a lot of constraints. So solvers that directly handle these constraints are better suited. 4. Model library: GAMS is longer around, so no surprise it has a larger library of example models. 5. Object Orientation. You are really comparing here building a model in a object oriented programming language like C# to a specialized modeling language (GAMS, OML). I believe that for complicated models, a special purpose language is more expressive than a OO traditional programming language. But if the model is not too complex, you are an experienced C# programmer and you need to use optimization inside a larger application, the API may be the better choice. As said earlier, it is possible to build a model in OML and use the API's to operate on the model. The MSF API's allow for some really nifty features, such as the use of LINQ in the data binding. Full disclosure: I have worked for GAMS and still have a close working relationship with them. I am probably biased in my opinions. I am a consultant, and people hire me to help with their models. Typically these are more complex models (otherwise they would not need me). So my experience with implementing models is probably skewed towards models where GAMS has an advantage. ---------------------------------------------------------------- Erwin Kalvelagen Amsterdam Optimization Modeling Group erwin.kalvelagen@gmail.com http://amsterdamoptimization.com ----------------------------------------------------------------
|
|
|
|
Erwin, thanks for your detailed, thoughtful comments. I'll throw in my own two cents (from my totally unbiased perspective ;)) I should mention that before my Micorosft days I worked with other modeling environments and solvers. Solver Foundation is a .Net component which shares the same design principles as the .Net framework itself. This enables industrial-scale, real-world problems to be modeled and solved in a wide variety of application types: web services, standalone programs, as a component in another application. Solver Foundation Services (SFS), the .Net API to Solver Foundation, is a key part of our offering. The idea is to make it easy for real applications to integrate with Solver Foundation. SFS can be used with any .Net language including C#, VB, F#, managed C++, etc. This means that the full capabilities of each language can be used in conjunction with Solver Foundation. In particular, the normal design patterns and best practices for object oriented programming definitely apply. We do provide examples of how to use SFS with all of the languages I mentioned above. We'll continue to add more. In my previous position I built ASP.Net applications, and I found it very easy to integrate Solver Foundation with web controls and web services. I didn't have to parse text files or redesign my application. Regarding your point 2, the computational overhead associated with using SFS is quite low. I can't give you exact numbers because of course it depends on a problem, but keeping the SFS overhead low is a high priority for the team. Solver Foundation has a solver plug-in model that allows a variety of third-party solvers to be used without recompliation or code changes. Generally speaking, the solver plug-ins are thin and add very little to the solve time. OML (Solver Foundation's declarative modeling language) and SFS are complementary. OML is aims to be a simple but powerful language for describing a wide range of optimization problems. We've made a delibrate choice to keep certain constructs out of OML because OML is squarely focused on declarative model specification. Excel is a great tool for data manipulation, C# is a modern, clean programming language, SQL is all about efficient storage, so we leave that stuff alone and build in the appropriate hooks. As time goes by OML's expressive capabilities will continue to expand to better cover the complex models Erwin spoke of. We'll also make it easier to build and test OML models. As Erwin mentioned, modeling real problems can be tough, so your point about our model library is well taken. Good examples are very important, and we will continue to add to our samples and blogs. My own experience is that modeling skills are "transferrable" - if you build up expertise in AMPL then moving over to GAMS is not too hard, and vice versa. Of course there are exceptions and hard-learned lessons, but I think the general point is true. Thanks, Nathan
|
|
|
|
Thanks Nathan and Erwin both of you for fantastic reply. As a person with a few years experience with optimization modelling, it is cool to see varous developement and oppotunities in the integration of .NET and mathematical programming. We have alway think the way to integrate our computational results with other industrial software interface.Now, SFS fill in the gap and provide a general and uniform framework for real-world and industrial complex optimization cases. Just like what Erwin has mentioned, many optimization models are really complex and difficult to solve even to obtain a satisfactory but not optimal solution. GAMS provide a powerful to manage complexity. As a mathematical modeller, user-friendly and system integrity are very very important issues. however, solutions are the most important thing for a optimization project. I am very happy to see if SFS and OML can learn some advantages of other mathematical programming frameworks such as GAMS so as to solve complex optimization problems and give us confident to transfer from other framework to SFS.
|
|
|
|
I just ran across MSF. Interesting. However the model manager limitations are still not clear to me. Right now I optimize using a simple mashup of the MPL Optimax library with Excel or Access using VBA. I develop the formulation using the MPL platform and then stuff it into a workbook or data base with Optimax. Simple enough. The cost to my client is the price of the Optimax library plus the solver. Problem size is unlimited. I.e. I can't envision using any version of MSF except Enterprise because of the problem size limitations of the restricted versions. And I can use all of the formulation complexities described by Erwin when developing my model with MPL. So given what I want to do, is MSF worth learning? Thanks, Steve Mack Washington DC
|
|
|
|
Hi Steve, I like to think of Solver Foundation as a pure .Net platform for modeling and optimization. We’ve tried to structure the system so that it is easy to use Solver Foundation as a component in many different contexts: in a web application, a line of business application, a silverlight app, as a standalone app, or through Office. As you mentioned in your other message, Solver Foundation provides a variety of different solvers. By providing a declarative modeling language and a common managed code API we provide value by keeping the focus on the business of specifying optimization problems and integrating them with applications. If your client is satisfied with the MPL-based solution, by all means you should keep your client happy! I do think Solver Foundation is still worth learning as it’s designed to be integrated with Microsoft’s developer tools and applications. Solver Foundation not only provides a unified modeling story between discrete optimization and continuous optimization, but also provides the freedom to use any of the main commercial third party solvers using our plug in model. Thanks for the comments, keep 'em coming. Nathan
|
|
|
|
Nathan, Hey, thanks a lot for the feedback. Most client apps are one-off and planning, not production centric. So I have not thought much about web apps because it's only a few guys in the client org who pay attention. But you're right, it's certainly something to get knowledgeable about. Especially if I come up with a "software as a service" optimization idea. I'm a pretty much a radical pragmatist when it comes to modeling. My clients don't care about MPL at all. They have no idea what is happening under the hood. But I care. Because I'm the developer and I want headache minimization. And I also care because I have to stick the client with the bill for Optimax and the solver engine. But MPL gives me the functionality to create complex multi-indexed variables and constraint sets without too much trouble. If I could replicate that functionality with MSF at a cheaper cost and/or mashup an open source or cheaper solver, I'd jump at it. The client would be oblivious. So I know what Optimax costs and I know what the solvers cost. But I don't know what Enterprise MSF costs or how good the native solver is with large MIPs. And if the functionality for complex index management is not there, I guess cost and solver performance are moot points. But hey, I know this is a new initiative and these things are always CWR. So great effort to date. I'll keep peeking in. Best, Steve P.S. I inquired about Enterprise pricing via a pop up email but nobody responded.
|
|
|
|
Hello Steve, We appear to be having some issues on the "Enterprise information" email - please contact me directly and I will be more than happy to answer any questions. -John Oberon
|
|