/home/coin/SVN-release/CoinAll-1.1.0/SYMPHONY/Applications/SPP+CUTS/include/spp.h

Go to the documentation of this file.
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 #include "spp_cg_params.h"
00025 #include "spp_lp_params.h"
00026 
00027 /*---------------------------------------------------------------------------*\
00028  * Use this data structure to store the value of any run-time parameters.
00029 \*---------------------------------------------------------------------------*/
00030 
00031 /* infile  -- contains the problem matrix (in our format only right now)
00032    our_format_file  -- when the problem matrix is needed to be saved in
00033                        our format, a file name is generated from this
00034                        name and our_format_file_counter. If the counter
00035                        is negative, won't save the matrix anywhere.
00036    matlab_format_file  -- when the sparsity structure of the problem
00037                           matrix is interesting, it can be saved in this
00038                           format (a nzcnt+1 by 3 table that matlab reads in to
00039                           form a sparse matrix), see show_sparsity.m
00040                           The counter works the same way as above.
00041 
00042    dupc_at_loadtime -- if set, delete duplicate columns that are next to
00043                        each other when loading in the problem.
00044 
00045    granularity -- the minimum difference between the objective values of two
00046                   (integral) feasible solutions if the objective values are
00047                   not considered the same  minus  epsilon.
00048                   (e.g., if all objective coefficients are integers then
00049                   granularity is 1.00 - epsilon, say .999)                   */
00050 
00051 typedef struct SPP_PARAMETERS{
00052    /* Name of file containing the instance data */
00053    char             infile[MAX_FILE_NAME_LENGTH + 1];
00054 
00055    int              dupc_at_loadtime;
00056 
00057    char             our_format_file[MAX_FILE_NAME_LENGTH];
00058    int              our_format_file_counter;
00059 
00060    char             matlab_format_file[MAX_FILE_NAME_LENGTH];
00061    int              matlab_format_file_counter;
00062 
00063    double           granularity;
00064    int              test;
00065    char             test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */ 
00066    int              verbosity;
00067 
00068 }spp_parameters;
00069 
00070 /*---------------------------------------------------------------------------*\
00071  * Use this data structure to store the instance data after it is read in.
00072 \*---------------------------------------------------------------------------*/
00073 
00074 typedef struct SPP_PROBLEM{
00075 
00076    spp_parameters     *par;              /* Parameters */
00077    spp_lp_params      *lp_par;
00078    spp_cg_params      *cg_par;
00079 
00080    statistics         *stat;             /* statistics */
00081 
00082    int                 input_type;       /* the type of the problem instance */
00083 
00084    int                 feasibility;      /* feasibility status of the problem */
00085    double              feas_value;       /* obj value of so far best feas soln */
00086    int                 feas_sol_length;  /* number of vars in ... */
00087    int                *feas_sol;         /* names of vars in ... */
00088 
00089    int                 orig_colnum;
00090    int                 orig_rownum;
00091    int                *orig_names;
00092    double             *orig_obj;
00093 
00094    col_ordered        *cmatrix;          /* problem matrix (col ordered) */
00095 
00096 }spp_problem;
00097 
00098 #endif

Generated on Sun Nov 14 14:06:41 2010 for Coin-All by  doxygen 1.4.7