del_column

Remove a column from the lp.

int del_column(lprec *lp, int column);

Return Value

del_column returns TRUE (1) if the operation was successful. A return value of FALSE (0) indicates an error.
An error occurs when column is not between 1 and the number of columns in the lp.

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

column

The column to delete. Must be between 1 and the number of columns in the lp.

Remarks

The del_column function deletes a column from the model. The column is effectively deleted, so all columns after this column shift one left.
Note that column 0 (the right hand side (RHS)) cannot be deleted. There is always a RHS.

Example

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

int main(void) 
{
  lprec *lp;

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

  del_column(lp, 1);

  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, add_column, str_add_column