set_presolveSpecifies if a presolve must be done before solving. void set_presolve(lprec *lp, int do_presolve); Return Value set_presolve has no return value. Parameters lp Pointer to previously created lp model. See return value of make_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI do_presolve Specifies presolve level. Can be the (OR) combination of any of the following values:
Remarks The set_presolve function specifies if a presolve must be done before
solving. Presolve looks at the model and tries to simplify it so that solving
times are shorter. For example a constraint on only one variable is converted
to a bound on this variable (and the constraint is deleted). Note that the
model dimensions can change because of this, so be careful with this. Both rows
and columns can be deleted by the presolve. int Norig_columns, Norig_rows, i; REAL value; Norig_columns = get_Norig_columns(lp); Norig_rows = get_Norig_rows(lp); for(i = 1; i <= Norig_columns; i++) { value = get_var_primalresult(lp, Norig_rows + i); printf("%f\n", value); } Note that there is no possibility to get the values of deleted rows. Example
See Also make_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, get_presolve, is_presolve |