# is_use_names

Returns if variable or constraint names are used.

unsigned char is_use_names(lprec *lp, unsigned char isrow);

Return Value

is_use_names returns a boolean value indicating if variable or constraint names are used.

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

isrow

Set to FALSE (0) if column information is needed and TRUE (1) if row information is needed.

Remarks

When a model is read from file or created via the API, variables and constraints can be named. These names are used to report information or to save the model in a given format. However, sometimes it is required to ignore these names and to use the internal names of lp_solve. This is for example the case when the names do not comply to the syntax rules of the format that will be used to write the model to.
Names are used by default.

Example

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

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

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

      ret = is_use_names(lp); /* will return TRUE */

      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_use_names, set_col_name, get_col_name, set_row_name, get_row_name