| Overview | Group | Index | Concepts | 
The routine CPXcopylpwnames copies LP data into a CPLEX
 problem object in the same way as the routine CPXcopylp, but
 using some additional arguments to specify the names of constraints and
 variables in the CPLEX problem object. The arguments to
 CPXcopylpwnames define an objective function, constraint
 matrix, variable bounds, righthand side constraint senses, and range
 values. Unlike the routine CPXcopylp,
 CPXcopylpwnames also copies names. This routine is used in
 the same way as CPXcopylp.
objsense | = 1 | (CPX_MIN) minimize | 
objsense | = -1 | (CPX_MAX) maximize | 
sense[i] | = 'L' | <= constraint | 
sense[i] | = 'E' | = constraint | 
sense[i] | = 'G' | >= constraint | 
sense[i] | = 'R' | ranged constraint | 
With respect to the parameters
 matbeg (beginning of the matrix),
 matcnt (count of the matrix),
 matind (indices of the matrix), and
 matval (values of the matrix),
 CPLEX needs to know only the nonzero coefficients.
 These are grouped by column in the array matval.
 The nonzero elements of every column must be stored in sequential
 locations in this array with matbeg[j] containing
 the index of the beginning of column j and
 matcnt[j] containing the number of entries
 in column j. The components of matbeg
 must be in ascending order. For each k, matind[k]
 indicates the row number of the corresponding coefficient,
 matval[k].
These arrays are accessed as follows. Suppose that CPLEX wants to access
 the entries in some column j. These are assumed to be given by
 the array entries:
matval[matbeg[j]],.., matval[matbeg[j]+matcnt[j]-1]
The corresponding row indices are:
matind[matbeg[j]],.., matind[matbeg[j]+matcnt[j]-1]
Entries in matind are not required to be in row order.
 Duplicate entries in matind and matval within a
 single column are not allowed. The length of the arrays matbeg
 and matind should be at least numcols. The
 length of arrays matind and matval should be at
 least matbeg[numcols-1]+matcnt[numcols-1]. 
When you build or modify your model with this routine,
 you can verify that the results are as you intended
 by calling CPXcheckcopylpwnames
 during application development.
 
Example
 status = CPXcopylpwnames (env,
                           lp,
                           numcols,
                           numrows,
                           objsen,
                           obj,
                           rhs,
                           sense,
                           matbeg,
                           matcnt,
                           matind,
                           matval,
                           lb,
                           ub,
                           rngval,
                           colname,
                           rowname);
 | env | A pointer to the CPLEX environment as returned by   | 
| lp | A pointer to a CPLEX problem object as returned by   | 
| numcols | An integer that indicates the number of columns in the constraint matrix, or equivalently, the number of variables in the problem object.  | 
| numrows | An integer that indicates the number of rows in the constraint matrix, not including the objective function or bounds on the variables.  | 
| objsense | An integer that indicates whether the problem is a minimization or maximization problem. Table 1 shows its possible settings.  | 
| objective | An array of length at least   | 
| rhs | An array of length at least   | 
| sense | An array of length at least   | 
| matbeg | An array that defines the constraint matrix.  | 
| matcnt | An array that defines the constraint matrix.  | 
| matind | An array that defines the constraint matrix.  | 
| matval | An array that defines the constraint matrix.  | 
| lb | An array of length at least   | 
| ub | An array of length at least   | 
| rngval | An array of length at least   | 
| colname | An array of length at least   | 
| rowname | An array of length at least   |