12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data TypesIn the Callable Library, <strong>ILOG</strong> <strong>CPLEX</strong> defines a few special data types for specific<strong>ILOG</strong> <strong>CPLEX</strong> objects, as you see in Table 4.1. The types starting with CPXC represent thecorresponding pointers to constant (const) objects.Table 4.1 Special Data Types in the <strong>ILOG</strong> <strong>CPLEX</strong> Callable LibraryData type Is a pointer to Declaration Set by callingCPXENVptrCPXCENVptr<strong>ILOG</strong> <strong>CPLEX</strong>environmentCPXENVptr env;CPXopen<strong>CPLEX</strong>CPXLPptrCPXCLPptrCPXNETptrCPXCNETptrproblem object CPXLPptr lp; CPXcreateprobproblem object CPXNETptr net; CPXNETcreateprobCPXCHANNELptr message channel CPXCHANNELptr channel; CPXgetchannelsCPXaddchannelWhen any of these special variables are set to a value returned by an appropriate routine, thatvalue can be passed directly to other <strong>ILOG</strong> <strong>CPLEX</strong> routines that require such parameters.The actual internal type of these variables is a memory address (that is, a pointer); thisaddress uniquely identifies the corresponding object. If you are programming in a languageother than C, you should choose an appropriate integer type or pointer type to hold thevalues of these variables.Ownership of Problem DataThe <strong>ILOG</strong> <strong>CPLEX</strong> Callable Library does not take ownership of user memory. All argumentsare copied from your user-defined arrays into <strong>ILOG</strong> <strong>CPLEX</strong>-allocated memory.<strong>ILOG</strong> <strong>CPLEX</strong> manages all problem-related memory. After you call a <strong>ILOG</strong> <strong>CPLEX</strong> routinethat copies data into a <strong>ILOG</strong> <strong>CPLEX</strong> problem object, you can free or reuse the memory youallocated as arguments to the copying routine.Problem Size and Memory Allocation IssuesAs indicated in Change the Problem Object on page 113, after you have created a problemobject by calling CPXcreateprob, you can modify the problem in various ways throughcalls to routines from the Callable Library. There is no need for you to allocate extra space inanticipation of future problem modifications. Any limit on problem size is set by systemresources and the underlying implementation of the system function malloc—not byartificial limits in <strong>ILOG</strong> <strong>CPLEX</strong>.116 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!