add_constraint, str_add_constraintAdd a constraint to the lp. int add_constraint(lprec *lp, REAL *row, short constr_type, REAL rh); int str_add_constraint(lprec *lp, char *str_row, short constr_type, REAL rh); Return Value add_constraint and str_add_constraint 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_file, read_LP, read_mps, read_MPS row An array with column elements that contains the values of the row. str_row A string with column elements that contains the values of the row. Each element must be separated by space(s). constr_type The type of the constraint. Can by any of the following values:
rh The value of the right hand side (RHS). Remarks The add_constraint, str_add_constraint functions adds a row to the
model (at the end) and sets all values of the row at once. Example
See Also make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, set_obj_fn, str_set_obj_fn, get_constr_type, del_constraint, add_column, str_add_column, get_column, get_row, get_mat, mat_elm |