get_bounds_tighter

Returns if set bounds may only be tighter or also less restrictive.

unsigned char get_bounds_tighter(lprec *lp);

Return Value

get_bounds_tighter returns if bounds may only be tighter or also less restrictive.

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_bounds_tighter function returns if bounds may only be tighter or also less restrictive. If set to TRUE then bounds may only be tighter. This means that when set_lowbo or set_lowbo is used to set a bound and the bound is less restrictive than an already set bound, then this new bound will be ignored. If FALSE, the new bound is accepted. This functionality is useful when several bounds are set on a variable and at the end you want the most restrictive ones. By default, this setting is FALSE. Note that this setting does not affect set_bounds.

Example

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

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

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

  tighter = get_bounds_tighter(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_bounds_tighter, set_upbo, get_upbo, set_lowbo, get_lowbo, set_bounds, set_unbounded, is_unbounded, is_negative