int user_receive_feasible_solution(void *user, int msgtag, double cost, 
                                   int numvars, int *indices, double *values)


This function is only used for parallel execution. Feasible solutions can be sent and/or stored in a user-defined packed form if desired. For instance, the TSP, a tour can be specified simply as a permutation, rather than as a list of variable indices. In the LP module, a feasible solution is packed either by the user or by a default packing routine. If the default packing routine was used, the msgtag will be FEASIBLE_SOLUTION_NONZEROS. In this case, cost, numvars, indices and values will contain the solution value, the number of nonzeros in the feasible solution, and their user indices and values. The user has only to interpret and store the solution. Otherwise, when msgtag is FEASIBLE_SOLUTION_USER, SYMPHONY will send and receive the solution value only and the user has to unpack exactly what she has packed in the LP module. In this case the contents of the last three arguments are undefined.

In most cases, SYMPHONY's default routines for sending and receiving feasible solutions, as well as displaying them, will suffice. These routines simply display all nonzeros by either index or name, depending on whether the user set the column names. See user_send_feasible_solution() for more discussion.


void *user IN Pointer to the user-defined data structure.
double cost IN The cost of the feasible solution.
int numvars IN The number of variables whose user indices and values were sent (length of indices and values).
int *indices IN The user indices of the nonzero variables.
double *values IN The corresponding values.

Return values:

USER_ERROR Ignored. This is probably not a fatal error.
USER_SUCCESS The solution has been unpacked and stored.
USER_DEFAULT Store the nonzeros in the solutions for later display.

Ted Ralphs