Originally posted by: SystemAdmin
> if I know the command write enr.sol in the Interactive Optimizer,
> what should the corresponding command in CPLEX Class API be?
I was not able to find a direct equivalent of 'write enr.sol' in MATLAB. You could instead write out a MST file (similar to SOL file, but only stores the values of the integer variables of the model and not the continuous ones) by the following command:
cplex.writeMipStart('enr.mst');
The other option is to set the intsolfileprefix parameter from its default value of '' to some name 'enr'. This will then direct the solver to write out the solution file (of the form 'enr-XXXXX.sol', XXXXX denoting the sequence of the solution) every time it finds a new solution to the model. This is available in CPLEX Optimization Studio 12.3 and later:
cplex.Param.output.intsolfileprefix.Cur='enr';
#CPLEXOptimizers#DecisionOptimization