guess_basisCreate a starting base from the provided guess vector. unsigned char guess_basis(lprec *lp, REAL *guessvector, int *basisvector); Return Value guess_basis returns TRUE if a valid base could be termined and FALSE if not. 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 guessvector A vector that must contain a feasible solution vector. It must contain at least 1+get_Ncolumns elements. Element 0 is not used. basisvector When successful, this vector contains a feasible basis corresponding to guessvector. The array must already be dimentioned for at least 1+get_Nrows+get_Ncolumns elements. When the routine returns successful, basisvector is filled with the basis. This array can be provided to set_basis. Remarks This routine is ment to find a basis based on provided variable values. This basis can be provided to lp_solve via set_basis. This can result in getting faster to an optimal solution. However the simplex algorithm doesn't guarantee you that. Example
See Also make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, get_basis, set_basis, default_basis, get_basiscrash set_basiscrash |