int user_generate_cuts_in_lp(void *user, int varnum, var_desc **vars, double *x, int *new_row_num, waiting_row ***new_rows)
The user might decide to generate cuts directly within the LP process
instead of using the cut generator. This can be accomplished either
through a call to this function or simply by configuring SYMPHONY such
that the cut generator is called directly from the LP solver. One
example of when this might be done is when generating Gomory cuts
(this is planned to be part of SYMPHONY later) or something else that
requires knowledge of the current LP tableau. The IN arguments are the
same as in user_send_lp_solution() (except
that there is no where argument). Not only the generated cuts
but the corresponding rows must be returned (the cuts are in the
waiting_row structures) because the user_unpack_cuts()
function will not be invoked for the generated cuts. Also, the user
must fill out the violation field for every row. The reason for
this is that any cut generated here will definitely correspond to the
current LP solution so the user must have already computed the
violation when generating the cut.
Post-processing consists of checking if any of the new cuts are
already in the local pool (or dominated by a cut in the local pool).
Since the user will probably use this function to generate
tableau-dependent cuts, it is highly unlikely that any of the new cuts would
already be in the pool. Therefore the user will probably return USER_AND_PP to force SYMPHONY to skip post-processing.
void *user | IN | Pointer to the user-defined LP data structure. |
int varnum | IN | The number of variables currently in the LP relaxation. (The length of the *vars and x arrays.) |
var_desc **vars | IN | The variables currently in the LP relaxation. |
double *x | IN | Values of the above variables. |
int *new_row_num | OUT | The number of cuts generated. |
waiting_row ***new_rows | OUT | The cuts and the corresponding rows. |
ERROR | Error. Interpreted as if no cuts were generated. |
USER_NO_PP | Cuts were generated but SYMPHONY must compare them to those in the local pool. |
USER_AND_PP | Cuts were generated and SYMPHONY should not compare them to those in the local pool. |
DEFAULT | No cuts are generated. (At least for now. We might add Gomory cuts for default later.) |
SYMPHONY checks if any of the newly generated rows are already in the local pool.