int QSget_status (QSprob p, int *status)
/* p is an initialized QSprob, a handle to an existing LP problem */ int rval, status; rval = QSget_status (p, &status); if (rval) { fprintf (stderr, "Unable to obtain status, error code %d\n", rval); } else { switch (status) { case QS_LP_OPTIMAL: printf ("An optimal solution is available\n"); break; case QS_LP_INFEASIBLE: printf ("The LP has no feasible solution\n"); break; case QS_LP_UNBOUNDED: printf ("The LP has unbounded objective value\n"); break; case QS_ITER_LIMIT: printf ("The optimizer reached its iteration limit\n"); break; case QS_TIME_LIMIT: printf ("The optimizer reached its time limit\n"); break; case QS_LP_UNSOLVED: printf ("The optimizer could not solve the LP\n"); break; case QS_LP_MODIFIED: printf ("The LP was modified since last optimization call\n"); break; default: printf ("Unknown solution status: %d\n", status); break; } }