user_is_feasible

int user_is_feasible(void *user, double lpetol, int varnum, int
                     *indices, double *values, int *feasible, 
                     double *objval, int branching, double *heur_solution)

Description:

The user can test the feasibility status of the solution to the current LP relaxation and/or return a feasible solution generated by a primal heuristic. This function is primarily used in cases where a solution satisfying integrality restrictions may not be feasible, i.e., it may violate an inequality not present in the current relaxation that will be generated by the user during the cut generation phase. In such a case, it is not possible for SYMPHONY to determine this and the user should set *feasible to IP_INFEASIBLE and return USER_SUCCESS. If the user tests the feasibility status of the solution and determines that the current solution is feasible, then *feasible should be set to IP_FEASIBLE instead. IN this case, the user can set *objval to the true objective function value of the feasible solution to account for any round-ff error introduced by the solver if desired. If all integral solution must be feasible, the user can ask SYMPHONY to simply test the integrality status by returning USER_DEFAULT.

If the user is able to generate a feasible solution using a primal heuristic, then the solution can be returned in a dense format in the array heur_solution. In this case, *objval should be set to the value of the solution and *feasible should be set to IP_HEUR_FEASIBLE.

Arguments:

void *user INOUT Pointer to the user-defined LP data structure.
     
double lpetol IN The $\epsilon$ tolerance of the LP solver.
int varnum IN The length of the indices and values arrays.
int *indices IN User indices of variables at nonzero level in the current solution.
double *values IN Values of the variables listed in indices.
     
int *feasible OUT Feasibility status of the solution (IP_INFEASIBLE, IP_FEASIBLE, or IP_HEUR_FEASIBLE).
double *objval INOUT The user can return the “true” objective function value of the solution in the case it is feasible, i.e., eliminating the round-off error. This variable should also be set to the value of the heuristic solution, if one is found.
int branching In Indicates whether the function is being invoked during strong branching (from select_branching_object()) or after solving an Lp relaxation (from fathom_branch()).
double *heur_solution OUT Used to return a solution determined heuristically.

Return values:

USER_ERROR Error. Solution is considered to be not feasible.
USER_SUCCESS User checked IP feasibility.
USER_DEFAULT SYMPHONY should test the integrality of the solution to determine if it is feasible.

Wrapper invoked from:
select_branching_object() after pre-solving the LP relaxation of a child corresponding to a candidate and from fathom_branch() after solving an LP relaxation.