Originally posted by: Inspiredlallu
Heylo,
I am reading linear equations from two files in java. Merging them into one IloCplex object. Then without exporting the model, give it to cplex to solve. That is, the entire cplex model is in memory object and has not been written to file before solving.
When I give this object to cplex to solve using cplex.solve(), it gives the result as 'optimal'.
But when I export the model from the cplex object to an lp file, then import it back to the same cplex object and call cplex.solve(), the result comes as 'infeasible'.
If I check my result by not using java apl's and directly test them in cplex solver, I get the result as infeasible. So, this means that the result given by java api's after exporting the model and then importing it back is correct.
Can someone tell me the reason why the exporting of model and then importing it back gives the correct result? And is there any way in which without the export & import also, the cplex gives correct result? I do not want to read and write files as it will take time and I do not want my application to take more time.
This is very urgent and any help would be appreciated.
Thanks and Regards,
Neha Bhatia
#CPLEXOptimizers#DecisionOptimization