# set_obj_in_basis Specifies if the objective is in the matrix or not. void set_obj_in_basis(lprec *lp, unsigned char obj_in_basis); Return Value set_obj_in_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, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI obj_in_basis TRUE or FALSE. Objective is in matrix or not. Remarks The set_obj_in_basis function specifies if the objective is in the matrix or not. The default is that the objective is in the matrix. By default, the objective function is stored as the top row in the constraint matrix When this function is called with obj_in_basis = FALSE then it is moved out into separate storage. When out of the basis, the computation of reduced costs is somewhat slower. In the late versions of v5.5, there is now the option to calculate reduced cost in the textbook way, i.e. completely independently of the basis. 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_obj_in_basis(lp, FALSE);

      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, is_obj_in_basis