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_file, read_LP, read_mps, read_MPS

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. Note that splitting depends on set_splitnegvars
The default range value is 0.

Example

#include <stdio.h>
#include <stdlib.h>
#include "lpkit.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); /* Will return 0 */

  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_negrange, set_splitnegvars, get_splitnegvars