NO FRAMES

CPXdualwrite

int CPXPUBLIC CPXdualwrite(CPXCENVptr env, CPXCLPptr lp, const char * filename_str, double * objshift_p)
Definition file: cplex.h
Include files: cplex.h

The routine CPXdualwrite is used to write a dual formulation of the current CPLEX problem object. MPS format is used. This function can only be applied to a linear program; it generates an error for other problem types.

Note
Any fixed variables in the primal are removed before the dual problem is written to a file. Each fixed variable with a nonzero objective coefficient causes the objective value to shift. As a result, if fixed variables are present, the optimal objective obtained from solving the dual problem created using CPXdualwrite may not be the same as the optimal objective of the primal problem. The objshift_p parameter can be used to reconcile this difference.

Example

 status = CPXdualwrite (env, lp, "myfile.dua", &objshift);

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 dual problem should be written.

objshift_p

A pointer to a variable of type double to hold the change in the objective function resulting from the removal of fixed variables in the primal.

Returns:

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