NO FRAMES

CPXcreateprob

CPXLPptr CPXPUBLIC CPXcreateprob(CPXCENVptr env, int * status_p, const char * probname_str)
Definition file: cplex.h
Include files: cplex.h

The routine CPXcreateprob creates a CPLEX problem object in the CPLEX environment. The arguments to CPXcreateprob define an LP problem name. The problem that is created is an LP minimization problem with zero constraints, zero variables, and an empty constraint matrix. The CPLEX problem object exists until the routine CPXfreeprob is called.

To define the constraints, variables, and nonzero entries of the constraint matrix, any of the CPLEX LP problem modification routines may be used. In addition, any of the routines beginning with the prefix CPXcopy may be used to copy data into the CPLEX problem object. New constraints or new variables can be created with the routines CPXnewrows or CPXnewcols, respectively.

Example

 lp = CPXcreateprob (env, &status, "myprob");
 

See also all the Callable Library examples (except those pertaining to networks) in the ILOG CPLEX User's Manual.

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

status_p

A pointer to an integer used to return any error code produced by this routine.

probname_str

A character string that specifies the name of the problem being created.

Returns:

If successful, CPXcreateprob returns a pointer that can be passed to other CPLEX routines to identify the problem object that is created. If not successful, a NULL pointer is returned, and an error status is returned in the variable *status_p. If the routine is successful, *status_p is 0 (zero).