Previous Page: CPXpperwriteFirst PageNext Page: CPXprimopt

CPXpreslvwrite


Description

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 that 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.

Return Value

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

Synopsis

int CPXpreslvwrite (CPXENVptr env,
                    CPXLPptr lp,
                    char *filename,
                    double *objoff_p);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

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

double *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.

Example

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

Previous Page: CPXpperwriteFirst PageNext Page: CPXprimopt