set_basiscrash

Determines a starting base.

void set_basiscrash(lprec *lp, int mode);

Return Value

None

Parameters

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

mode

Specifies which basis crash mode is used. Can by any of the following values:

CRASH_NOTHING (0) No basis crash
CRASH_MOSTFEASIBLE (2)

Remarks

The set_basiscrash function specifies which basis crash mode must be used. This can influence the solving time considerly. Default it is CRASH_NOTHING.

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);
  }

  /* Model created */

  set_basiscrash(lp, CRASH_MOSTFEASIBLE);

  delete_lp(lp);

  return(0);
}

lp_solve API reference

See Also make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, get_basiscrash, default_basis, get_basis, set_basis