get_Lrows

Returns the number of Lagrangian rows in the lp.

int get_Lrows(lprec *lp);

Return Value

get_Lrows returns the number of Lagrangian rows in the lp.

Parameters

lp

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

Remarks

The get_Lrows function returns the number of Lagrangian rows in the lp.
A Lagrangian row is added via add_lag_con.

Example

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

int main(void)
{
  lprec *lp;
  REAL row[1+2];
  int Lrows;

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

  row[1] = 1.0;
  row[2] = 1.0;
  add_lag_con(lp, row, LE, 1.0);

  Lrows = get_Lrows(lp); /* Will return 1 */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, get_Nrows, get_Norig_rows, get_Ncolumns, get_Norig_columns, get_orig_index, get_lp_index, add_lag_con, lag_solve