get_statustext

Returns the description of a returncode of the solve function.

char *get_statustext(lprec *lp, int statuscode);

Return Value

The description of a returncode of the solve 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

statuscode

Returncode of solve

Remarks

The get_statustext function returns a comprehensible description of a returncode of the solve function.

Example

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

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

  /* 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 */

  /*
  .
  .
  .
  */

  ret = solve(lp);

  printf("%s\n", get_statustext(lp, ret));
  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, solve