This example differs from lpex2.c
in its command line. In qpex2.c
, there is no need of a command-line argument to indicate which optimizer to call, as only the ILOG CPLEX Barrier Optimizer is used to solve QPs. In other words, this example always calls the routine CPXbaropt()
.
This example also differs in the way it shows a solution. Since no basis is available for the QP, this example calls the routine CPXgetx()
to get a solution. It is, however, possible to call CPXsolution()
to get a primal and dual solution to the problem.
Like other applications based on the ILOG CPLEX Callable Library, this one begins with calls to CPXopenCPLEX()
to initialize the ILOG CPLEX environment and to CPXcreateprob()
to create the problem object. Before it ends, it frees the problem object with a call to CPXfreeprob()
, and it frees the environment with a call to CPXcloseCPLEX()
.