Initializing help system before first use

Problem Loading

Once a problem pointer has been created, an optimization problem can be loaded into it. The problem can be loaded either from file or from memory via the suite of problem loading and problem manipulation routines available in the Optimizer library interface. The simplest of these approaches, and the only approach available to Console Optimizer users, is to read a matrix from an MPS or LP file using XPRSreadprob (READPROB).

{
  XPRSprob prob;
  XPRScreateprob(&prob);
  XPRSsetlogfile(prob, "logfile.log");
  XPRSreadprob(prob, "hpw15", "");
  XPRSdestroyprob(prob);
}

Library users can construct the problem in their own arrays and then load this problem specification using one of the functions XPRSloadlp, XPRSloadqp, XPRSloadqcqp, XPRSloadglobal, XPRSloadqglobal or XPRSloadqcqpglobal. During the problem load routine the Optimizer will use the user's data to construct the internal problem representation in new memory that is associated with the problem pointer. Note, therefore, that the user's arrays can be freed immediately after the call. Once the problem has been loaded, any subsequent call to one of these load routines will overwrite the problem currently represented in the problem pointer.

The names of the problem loading routines indicate the type of problem that can be represented using the routine. The following table outlines the components of an optimization problem as denoted by the codes used in the function names.

Code Problem Content
lp Linear Program (LP) (linear constraints and linear objective)
qp Quadratic Program (LP with quadratic objective)
global Global Constraints (LP with discrete entities e.g., binary variables)
qc Quadratic Constraints (LP with quadratic constraints)

Many of the array arguments of the load routines can optionally take NULL pointers if the associated component of the problem is not required to be defined. Note, therefore, that the user need only use the XPRSloadqcqpglobal routine to load any problem that can be loaded by the other routines.

Finally, note that the names of the rows and columns of the problem are not loaded together with the problem specification. These may be loaded afterwards using a call to the function XPRSaddnames.