reset_basis

Resets the basis to the initial basis.

void reset_basis(lprec *lp);

Return Value

reset_basis has no return value.

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

Remarks

The reset_basis function resets the basis to the initial basis.
The default initial basis is bascolumn[x] = x.
Setting an initial basis can speed up the solver considerably. It is the starting point from where the algorithm continues to find an optimal solution.
When a restart is done, lp_solve continues at the last basis, except if reset_basis or set_basis is called.

Example

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

int main(void)
{
  lprec *lp;

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

  reset_basis(lp);

  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_basis, set_basis