user_readparams

[cf]user_readparams
int user_readparams(void *user, char *filename, int argc, char **argv)

Description:

The user can optionally read in parameter settings from the file named filename, specified on the command line using the -f switch. The parameter file filename can contain both SYMPHONY's built-in parameters and user-defined parameters. If desired, the user can open this file for reading, scan the file for lines that contain user parameter settings and then read the parameter settings. A shell for doing this is set up in the in the file SYMPHONY-5.0/USER/user_master.c. Also, see the file Master/master_io.c to see how SYMPHONY does this.

The user can also parse the command line arguments for user settings. A shell for doing this is also set up in the file SYMPHONY-5.0/USER/user_master.c. Upper case letters are reserved for user-defined command line switches. The switch -H is reserved for help and calls the user's usage subroutine (see user_usage). If the user returns `USER_DEFAULT', then SYMPHONY will look for the command-line switches -F to specify the file name for reading in the model from either an MPS or a GMPL/AMPL file or -L to specify the file name for reading in the model from an LP format file. The -D command-line switch is used to specify an additional data file for GMPL/AMPL models. If the -D option is not present, SYMPHONY assumes the file is an MPS file.

Arguments:

void *user IN Pointer to the user-defined data structure.
char *filename IN The name of the parameter file.

Return values:

USER_ERROR Error. SYMPHONY stops.
USER_SUCCESS User parameters were read successfully.
USER_DEFAULT SYMPHONY will read in the problem instance from either an MPS, LP, or GMPL/AMPL file. The command-line switches -F, -L, and -D (as appropriate) will be used to specify the model file.



Ted Ralphs
2010-03-24