is_semicont

Gets the type of the variable. semi-continuous or not.

unsigned char is_semicont(lprec *lp, int column);

Return Value

is_semicont returns TRUE (1) if the variable is set as semi-continuous, FALSE (0) otherwise.

Parameters

lp

Pointer to previously created lp model. See return value of make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI

column

The column number of the variable that must be checked. It must be between 1 and the number of columns in the lp.

Remarks

The is_semicont function returns if a variable must be semi-continuous or not. Default a variable is not semi-continuous. See semi-continuous variables for a description about semi-continuous variables.

Example

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

int main(void)
{
  lprec *lp;
  unsigned char sc;

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

  sc = is_semicont(lp, 1); /* will return 0 since the variable is not set as semi-continuous at this point */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, set_semicont