int user_create_subproblem(void *user, int *indices, MIPdesc *mip,
                           int *maxn, int *maxm, int *maxnz)


Based on the instance data contained in the user data structure and the list of base and extra variables that are active in the current subproblem, the user has to create the subproblem for the search node. The matrix describing the subproblem must contain those variables whose user indices are listed in the array indices (in the same order) and the base constraints. The extra (dynamically generated) constraints are added automatically by SYMPHONY after the initial subproblem description is created.

In this function, the user is required to construct a description of the subproblem in column-ordered format and pass it back to SYMPHONY by filling out the MIPdesc data structure, described here. The user is not responsible for allocating extra memory to allow for the addition of dynamically generated cuts and variables. The arrays allocated in user_create_subproblem() are owned by SYMPHONY after allocation and are freed as soon as the relaxation is loaded into the solver. However, if the user has an idea as to the maximum number of variables and constraints that are likely to be generated during processing of the subproblem, this information can be passed to SYMPHONY in the variables *maxn, *maxm, and *maxnz. These numbers are only estimates that SYMPHONY can use to perform memory allocation. They do not have to be exact numbers. In fact, these estimates need not be provided at all. The obj_sense and obj_offset fields are set globally in the function user_initialize_root_node(). Setting them here will have no effect.

Note that, the user should return ``USER_DEFAULT'' if an MPS or GMPL/AMPL file was read in to describe the original MILP. SYMPHONY will allocate the corresponding arrays and specify the constraint matrix automatically in this case.


void *user IN Pointer to the user-defined LP data structure.
int *indices IN The list of the active variables (base and extra).
MIPdesc *mip OUT Pointer to the MIPdesc data structure.
int *maxn OUT Estimated maximum number of variables.
int *maxm OUT Estimated maximum number of constraints.
int *maxnz OUT Estimated maximum number of nonzeros.

Return values:

USER_ERROR Error. The LP module is aborted.
USER_SUCCESS User created the constraint matrix with the base constraints.
USER_DEFAULT This return code is used when the default routines for reading in an MPS or AMPL file were used and the user wants to let SYMPHONY set up the subproblem automatically. This return will cause an error if the default I/O routines were not used.


The extra constraints are added to the matrix by calling the user_unpack_cuts() subroutine and then adding the corresponding rows to the matrix. This is easier for the user to implement, but less efficient than adding the cuts at the time the original matrix was being constructed.

Wrapper invoked from:
process_chain() which is invoked when setting up a the initial search node in a chain.

Ted Ralphs