00001 /*===========================================================================*/ 00002 /* */ 00003 /* This file is part of a demonstration application for use with the */ 00004 /* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */ 00005 /* the Set Partitioning Problem. */ 00006 /* */ 00007 /* (c) Copyright 2005-2008 Marta Eso and Ted Ralphs. All Rights Reserved. */ 00008 /* */ 00009 /* This application was originally developed by Marta Eso and was modified */ 00010 /* Ted Ralphs (tkralphs@lehigh.edu) */ 00011 /* */ 00012 /* This software is licensed under the Common Public License. Please see */ 00013 /* accompanying file for terms. */ 00014 /* */ 00015 /*===========================================================================*/ 00016 00017 #ifndef _SPP_H 00018 #define _SPP_H 00019 00020 #include "sym_proto.h" 00021 00022 #include "spp_types.h" 00023 #include "spp_constants.h" 00024 00025 /*---------------------------------------------------------------------------*\ 00026 * Use this data structure to store the value of any run-time parameters. 00027 \*---------------------------------------------------------------------------*/ 00028 00029 /* infile -- contains the problem matrix (in our format only right now) 00030 our_format_file -- when the problem matrix is needed to be saved in 00031 our format, a file name is generated from this 00032 name and our_format_file_counter. If the counter 00033 is negative, won't save the matrix anywhere. 00034 matlab_format_file -- when the sparsity structure of the problem 00035 matrix is interesting, it can be saved in this 00036 format (a nzcnt+1 by 3 table that matlab reads in to 00037 form a sparse matrix), see show_sparsity.m 00038 The counter works the same way as above. 00039 00040 dupc_at_loadtime -- if set, delete duplicate columns that are next to 00041 each other when loading in the problem. 00042 00043 granularity -- the minimum difference between the objective values of two 00044 (integral) feasible solutions if the objective values are 00045 not considered the same minus epsilon. 00046 (e.g., if all objective coefficients are integers then 00047 granularity is 1.00 - epsilon, say .999) */ 00048 00049 typedef struct SPP_PARAMETERS{ 00050 /* Name of file containing the instance data */ 00051 char infile[MAX_FILE_NAME_LENGTH + 1]; 00052 00053 int dupc_at_loadtime; 00054 00055 char our_format_file[MAX_FILE_NAME_LENGTH]; 00056 int our_format_file_counter; 00057 00058 char matlab_format_file[MAX_FILE_NAME_LENGTH]; 00059 int matlab_format_file_counter; 00060 00061 double granularity; 00062 int test; 00063 char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */ 00064 int verbosity; 00065 }spp_parameters; 00066 00067 /*---------------------------------------------------------------------------*\ 00068 * Use this data structure to store the instance data after it is read in. 00069 \*---------------------------------------------------------------------------*/ 00070 00071 typedef struct SPP_PROBLEM{ 00072 00073 spp_parameters *par; /* Parameters */ 00074 00075 statistics *stat; /* statistics */ 00076 00077 int input_type; /* the type of the problem instance */ 00078 00079 int feasibility; /* feasibility status of the problem */ 00080 double feas_value; /* obj value of so far best feas soln */ 00081 int feas_sol_length; /* number of vars in ... */ 00082 int *feas_sol; /* names of vars in ... */ 00083 00084 int orig_colnum; 00085 int orig_rownum; 00086 int *orig_names; 00087 double *orig_obj; 00088 00089 col_ordered *cmatrix; /* problem matrix (col ordered) */ 00090 00091 }spp_problem; 00092 00093 #endif