The QSprob provided by this function is the starting point for building an LP problem from within an application. The QSprob is a handle to an empty problem that can be filled-in by the functions listed in the Modifying an LP Problem section in the Callable Function Library. To specify a minimization problem set objsense to QS_MIN (that is, 1), and to specify a maximization problem set objsense to QS_MAX (that is, -1); if objsense is given some other value, the objective function defaults to minimization. A standard method is to follow the QScreate_prob call with calls to QSnew_row to initialize the constraints, then calls to QSadd_col to create the variables and to build the coefficients in the constraint matrix. Alternatively, one can first use QSnew_col to initialize the variables, then use QSadd_row to create the constraints and the constraint matrix. (Or mix the column and row operations, if that is more natural in the given application.)
|