set_lp_name

Set the name of the lp.

int set_lp_name(lprec *lp, char *name);

Return Value

set_lp_name returns TRUE (1) if the operation was successful. A return value of FALSE (0) indicates an error.
lp->spx_status specifies what error occurred.

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

name

The name for the lp.

Remarks

The set_lp_name sets the name of the lp.
Giving the lp a name is optional. The default name is "Unnamed".

Example

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

int main(void)
{
  lprec *lp;

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

  set_lp_name(lp, "test");

  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, get_lp_name