is_anti_degen

Returns if perturbations must be used to reduce degeneracy/cycling while solving.

short is_anti_degen(lprec *lp);

Return Value

is_anti_degen returns TRUE or FALSE. Do perturbations or not.

Parameters

lp

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

Remarks

The is_anti_degen function returns a flag if perturbations must be used to reduce degeneracy/cycling while solving. Setting this flag can avoid cycling, but can also increase numerical instability. The default is not (FALSE).

Example

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

int main(void)
{
  lprec *lp;
  short anti_degen;

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

  anti_degen = is_anti_degen(lp); /* Will return FALSE */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, set_anti_degen