get_status

Returns an extra status after a call to a function.

int get_status(lprec *lp);

Return Value

Extra status which indicates type of problem after call to function.

Parameters

lp

Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI

Remarks

The get_status function returns an extra status after a call to a function. Some functions return FALSE when they have failed. To have more information on the reason of the failure, this routine can be used to get an extended error code.

Example

#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.h"

int main(void)
{
  lprec *lp;
  int spx_status;

  /* Create a new LP model */
  lp = make_lp(0, 0);
  if(lp == NULL) {
    fprintf(stderr, "Unable to create new LP model\n");
    return(1);
  }

  /* Model created */

  /*
  .
  .
  .
  */

  spx_status = get_status(lp);

  return(0);
}

lp_solve API reference

See Also free_lp, make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI