Originally posted by: SystemAdmin
[jfk said:]
The short answer is no, that is, you can't program with C++ in OPL.
The long answer as follows.
OPL is a language (optimization programming language) much simpler then any structured programming language, such as C++, designed specifically for modeling and solving optimization problems. The good news is that if you could make code (models) in C++ and you could solve them with ILOG CPLEX, then using OPL would be much easier. If you download the OPL trial version and take a look at the example problems you will recognize how clear they are and I think you wouldn't even need the help manual for many of the structures, because they are so obvious. Beside the simpler language constructs in OPL you can easily read/write data/result from/to DB (e.g. Oracle, H2, Access) or excel spreadsheet. You can have many run configurations (same/different model sets/data sets). Naturally in OPL you can access all the functionalities what you have in CPLEX (solution pool, automatic tuning, diferent algorithmic settings, etc). In OPL you can have scripts for flow control and data processing as well. Also you can go beyond linear programming since OPL enables you to use constraint programing (certain part of discrete nonlinear programming), what you can't do with CPLEX. And at the end of the road if you want to embed your models written in OPL into some applications you can do it through the provided API's of Java, .Net, etc, so you don't have to rewrite them in the respective environment in C#, C++, Java etc.
Well, you may think the few lines above is just a marketing blabla. You will never know if you don't try OPL. I invite you to download the trial version and get a taste.
cheers
#CPLEXOptimizers#DecisionOptimization