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.

◆◆◆If your Callable Library application builds the arrays of the problem in memory and thencalls CPXcopylp, it avoids time-consuming reads from disk files.In the Callable Library, using the routines CPXnewcols, CPXnewrows, CPXaddcols,CPXaddrows, and CPXchgcoeflist may help you build modular code that will bemore easily modified and maintained than code that assembles all problem data in onestep.An application that reads an MPS or LP file may reduce the coding effort but, on theother hand, may increase runtime and disk space requirements.Keep in mind that if an application using the <strong>ILOG</strong> <strong>CPLEX</strong> Component Libraries readsan MPS or LP file, then some other program must generate that formatted file. The datastructures used to generate the file can almost certainly be used directly to build theproblem-populating arrays for CPXcopylp or CPXaddrows—a choice resulting in lesscoding and a faster, more efficient application.In short, formatted files are useful for prototyping your application. For productionpurposes, assembly of data arrays in memory may be a better enhancement.Test Data<strong>ILOG</strong> <strong>CPLEX</strong> provides a parameter to check the correctness of data used in problemcreation and problem modification methods: DataCheck (bool) orCPX_PARAM_DATACHECK (int). When this parameter is set, <strong>ILOG</strong> <strong>CPLEX</strong> will performextra checks to confirm that array arguments contain valid values, such as indices withinrange, no duplicate entries, valid row sense indicators and valid numeric values. Thesechecks can be very useful during development, but are probably too costly for deployedapplications. The checks are similar to but not as extensive as those performed by theCPXcheckData functions provided for the C-API. When the parameter is not set (thedefault), only simple error checks are performed, for example, checking for the existence ofthe environment.Choose an OptimizerAfter you have instantiated and populated a problem object, you solve it by calling one ofthe optimizers available in the <strong>ILOG</strong> <strong>CPLEX</strong> Component Libraries. Your choice ofoptimizer depends on the type of problem:◆◆◆Use the primal simplex, dual simplex, or primal-dual barrier optimizers to solve linearand quadratic programs.Use the barrier optimizer to solve quadratically constrained programming problems.The network optimizer is appropriate for solving linear and quadratic programs withlarge embedded networks.<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 135

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

Saved successfully!

Ooh no, something went wrong!