next up previous contents Back to SYMPHONY Home Page
Next: user_send_lp_data Up: User-written functions of the Previous: user_create_root

   
user_receive_feasible_solution

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

Description:

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 process, 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 process. In this case the contents of the last three arguments are undefined.

Arguments:

void *user IN Pointer to the user-defined data structure.
int msgtag IN FEASIBLE_SOLUTION_NONZEROS or FEASIBLE_SOLUTION_USER
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:

ERROR Ignored. This is probably not a fatal error.
USER_NO_PP The solution has been unpacked and stored.




next up previous contents
Next: user_send_lp_data Up: User-written functions of the Previous: user_create_root
Ted Ralphs
2000-09-08