# get_negrange

Returns the negative value below which variables are split into a negative and a positive part.

REAL get_negrange(lprec *lp);

Return Value

get_negrange returns the negative value below which variables are split into a negative and a positive part.

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_negrange function returns the negative value below which variables are split into a negative and a positive part. This value is always zero or negative.
In some cases, negative variables must be split in a positive part and a negative part. This is when a negative lower or upper bound is set on a variable. If a bound is less than this value, it is possibly split. The default is -1e6.

Example

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

    int main(void)
    {
      lprec *lp;
      REAL negrange;

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

      negrange = get_negrange(lp);

      delete_lp(lp);
      return(0);
    }

lp_solve API reference

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