set_preferdual

Sets the desired combination of primal and dual simplex algorithms.

void set_preferdual(lprec *lp, unsigned char dodual);

Return Value

set_preferdual has no return value.

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

dodual

When TRUE, the simplex strategy is set to SIMPLEX_DUAL_DUAL.
When FALSE, the simplex strategy is set to SIMPLEX_PRIMAL_PRIMAL.
See also get_simplextype

Remarks

The set_preferdual function sets the desired combination of primal and dual simplex algorithms.
set_preferdual with dodual = TRUE is a shortcut for set_simplextype(SIMPLEX_DUAL_DUAL)
set_preferdual with dodual = FALSE is a shortcut for set_simplextype(SIMPLEX_PRIMAL_PRIMAL)
The default is SIMPLEX_DUAL_PRIMAL (6).

Example

#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.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_preferdual(lp, 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, get_simplextype