NO FRAMES

CPXpreslvwrite

int CPXPUBLIC CPXpreslvwrite(CPXCENVptr env, CPXLPptr lp, const char * filename_str, double * objoff_p)
Definition file: cplex.h
Include files: cplex.h

The routine CPXpreslvwrite is used to write a presolved version of the problem to a file. The file is saved in binary format, and can be read using the routine CPXreadcopyprob.

Note
Reductions done by the CPLEX presolve algorithms can cause the objective value to shift. As a result, the optimal objective obtained from solving the presolved problem created using CPXpreslvwrite may not be the same as the optimal objective of the original problem. The objoff_p parameter can be used to reconcile this difference.

Example

 status = CPXpreslvwrite (env, lp, "myfile.pre", &objoff);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

filename_str

A character string containing the name of the file to which the presolved problem should be written.

objoff_p

A pointer to a double precision variable that is used to hold the objective value difference between the original problem and the presolved problem. That is: orginal objective value = (*objoff_p) + presolved objective value

Returns:

The routine returns zero on success and nonzero if an error occurs.