If you write your code in a programming language (C, C++, Java, Python, ...) then you can get the solution vector from CPLEX and directly feed it into the part of the code that creates the second model.
If you instead solve on the command line or in different processes you can export the solution to a file and read that file from the code that creates the model. CPLEX has functions to write and read solution files.
Finally, if you are writing in OPL then you could write your models to a text file (using IloOplOutputFile
) in .dat
format and use that file as input for the second model. Or use the solution from the first model as starting point for the second model as described in the example warmstart
that is shipped with CPLEX.