set_obj_fn, set_obj_fnex, str_set_obj_fn, set_objSet the objective function (row 0) of the matrix. unsigned char set_obj_fn(lprec *lp, REAL *row); unsigned char set_obj_fnex(lprec *lp, int count, REAL *row, int *colno); unsigned char str_set_obj_fn(lprec *lp, char *row_string); unsigned char set_obj(lprec *lp, int column, REAL value); Return Value set_obj_fn, set_obj_fnex, str_set_obj_fn and set_obj return TRUE (1) if the operation was successful. A return value of FALSE (0) indicates an error. 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 count Number of elements in row and colno. row An array with 1+get_Ncolumns (count for set_obj_fnex) elements that contains the values of the objective function. colno An array with count elements that contains the column numbers of the row. However this variable can also be NULL. In that case element i in the variable row is column i. row_string A string with column elements that contains the values of the objective function. Each element must be separated by space(s). column The column number for which the value must be set. value The value that must be set. Remarks
The set_obj_fn, set_obj_fnex, str_set_obj_fn functions set all values of the
objective function at once. Example
See Also make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, add_constraint, add_constraintex, str_add_constraint, set_row, set_rowex, add_column, add_columnex, str_add_column, set_column, set_columnex, get_column, get_columnex, get_row, get_rowex, get_mat |