Originally posted by: SystemAdmin
> I tried compiling the C++ code you have provided. I could not see any effects on it. When I execute it just opens a command window and printing....
>
> Press any key to continue....
>
The code expects the model file to be converted on the command line and then prints the OPL model to stdout. So you have to provide the model file to be converted on the command line and capture the output of the program in a .mod file.
On the other hand, it should be no problem to change the code to use a different method for input and/or output.
> Also I have one general question kindly clarify here....
>
> What is the difference in using the ilomipex2.cpp file ( which reads in LP file and solves MIP problem) and implementing our own c++ code for the model.
>
These are just two different ways to populate and instance of the IloModel class. Once the instance is populated it does not matter any longer where the data came from. If you already have existing code that generates LP files then it might be simpler to just read in LP files. If you don't have such code yet then it is probably simpler to directly build up your model in C++.
> As I understood, both the ways returns a same output solution readable through file. Is it correct???
>
Correct.
#CPLEXOptimizers#DecisionOptimization