get_simplextype

Returns the desired combination of primal and dual simplex algorithms.

int get_simplextype(lprec *lp);

Return Value

get_simplextype returns the desired combination of primal and dual simplex algorithms.
Can be any of the following values:

SIMPLEX_PRIMAL_PRIMAL (5) Phase1 Primal, Phase2 Primal
SIMPLEX_DUAL_PRIMAL (6) Phase1 Dual, Phase2 Primal
SIMPLEX_PRIMAL_DUAL (9) Phase1 Primal, Phase2 Dual
SIMPLEX_DUAL_DUAL (10) Phase1 Dual, Phase2 Dual

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_simplextype function returns the desired combination of primal and dual simplex algorithms. The default is SIMPLEX_DUAL_PRIMAL (6).

Example

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

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

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

  primal_dual = get_simplextype(lp);

  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_simplextype, set_preferdual