Thursday, April 14, 2011

Modeling vs writing code

Recently I delivered a prototype model that implements some supply chain functionality and will be integrated into an  Enterprise Resource Planning (ERP) system. The model was implemented in Microsoft Solver Foundation. I often find expressing optimization models in code somewhat cumbersome and less productive than using a more compact modeling language. So I chose to use the same approach as shown here: I.e. embed the model in a C# but still use the modeling language (in this case OML). Of course the model itself (about 50 lines) is much “smaller” than all the code needed to prepare the data and getting the data in and out (even though the .NET DataTables have nice functionality to process data – even without using LINQ).