get_Norig_rows

Returns the number of original rows (constraints) in the lp.

int get_Norig_rows(lprec *lp);

Return Value

get_Norig_rows returns the number of original rows (constraints) in the lp.

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_Norig_rows function returns the number of original rows (constraints) in the lp.
Note that the number of rows (get_Nrows) can change when a presolve is done. get_Norig_rows does not change and thus returns the original number of rows in the lp.

Example

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

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

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

  Norig_rows = get_Norig_rows(lp); /* Will return 1 */

  set_presolve(lp, PRESOLVE_ROWS);
  solve(lp);

  Norig_rows = get_Norig_rows(lp); /* Will return 1 */

  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, get_Nrows, get_Lrows, get_Ncolumns, get_Norig_columns, get_orig_index, get_lp_index