Dip  0.92.4
spp.h
Go to the documentation of this file.
1 /*===========================================================================*/
2 /* */
3 /* This file is part of a demonstration application for use with the */
4 /* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */
5 /* the Set Partitioning Problem. */
6 /* */
7 /* (c) Copyright 2005-2013 Marta Eso and Ted Ralphs. All Rights Reserved. */
8 /* */
9 /* This application was originally developed by Marta Eso and was modified */
10 /* Ted Ralphs (ted@lehigh.edu) */
11 /* */
12 /* This software is licensed under the Eclipse Public License. Please see */
13 /* accompanying file for terms. */
14 /* */
15 /*===========================================================================*/
16 
17 #ifndef _SPP_H
18 #define _SPP_H
19 
20 #include "sym_proto.h"
21 
22 #include "spp_types.h"
23 #include "spp_constants.h"
24 #include "spp_cg_params.h"
25 #include "spp_lp_params.h"
26 
27 /*---------------------------------------------------------------------------*\
28  * Use this data structure to store the value of any run-time parameters.
29 \*---------------------------------------------------------------------------*/
30 
31 /* infile -- contains the problem matrix (in our format only right now)
32  our_format_file -- when the problem matrix is needed to be saved in
33  our format, a file name is generated from this
34  name and our_format_file_counter. If the counter
35  is negative, won't save the matrix anywhere.
36  matlab_format_file -- when the sparsity structure of the problem
37  matrix is interesting, it can be saved in this
38  format (a nzcnt+1 by 3 table that matlab reads in to
39  form a sparse matrix), see show_sparsity.m
40  The counter works the same way as above.
41 
42  dupc_at_loadtime -- if set, delete duplicate columns that are next to
43  each other when loading in the problem.
44 
45  granularity -- the minimum difference between the objective values of two
46  (integral) feasible solutions if the objective values are
47  not considered the same minus epsilon.
48  (e.g., if all objective coefficients are integers then
49  granularity is 1.00 - epsilon, say .999) */
50 
51 typedef struct SPP_PARAMETERS{
52  /* Name of file containing the instance data */
53  char infile[MAX_FILE_NAME_LENGTH + 1];
54 
55  int dupc_at_loadtime;
56 
59 
62 
63  double granularity;
64  int test;
65  char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */
66  int verbosity;
67 
69 
70 /*---------------------------------------------------------------------------*\
71  * Use this data structure to store the instance data after it is read in.
72 \*---------------------------------------------------------------------------*/
73 
74 typedef struct SPP_PROBLEM{
75 
76  spp_parameters *par; /* Parameters */
79 
80  statistics *stat; /* statistics */
81 
82  int input_type; /* the type of the problem instance */
83 
84  int feasibility; /* feasibility status of the problem */
85  double feas_value; /* obj value of so far best feas soln */
86  int feas_sol_length; /* number of vars in ... */
87  int *feas_sol; /* names of vars in ... */
88 
89  int orig_colnum;
90  int orig_rownum;
91  int *orig_names;
92  double *orig_obj;
93 
94  col_ordered *cmatrix; /* problem matrix (col ordered) */
95 
97 
98 #endif
double * orig_obj
Definition: spp.h:87
int input_type
Definition: spp.h:77
int orig_colnum
Definition: spp.h:84
int * orig_names
Definition: spp.h:86
double feas_value
Definition: spp.h:80
int * feas_sol
Definition: spp.h:82
col_ordered * cmatrix
Definition: spp.h:89
int dupc_at_loadtime
Definition: spp.h:53
struct SPP_PARAMETERS spp_parameters
spp_cg_params * cg_par
Definition: spp.h:78
char infile[MAX_FILE_NAME_LENGTH+1]
Definition: spp.h:51
char our_format_file[MAX_FILE_NAME_LENGTH]
Definition: spp.h:55
char matlab_format_file[MAX_FILE_NAME_LENGTH]
Definition: spp.h:58
#define MAX_FILE_NAME_LENGTH
Definition: sym_proto.h:18
double granularity
Definition: spp.h:61
spp_parameters * par
Definition: spp.h:73
spp_lp_params * lp_par
Definition: spp.h:77
int verbosity
Definition: spp.h:64
int orig_rownum
Definition: spp.h:85
statistics * stat
Definition: spp.h:75
int feasibility
Definition: spp.h:79
int our_format_file_counter
Definition: spp.h:56
char test_dir[MAX_FILE_NAME_LENGTH+1]
Definition: spp.h:63
struct SPP_PROBLEM spp_problem
int feas_sol_length
Definition: spp.h:81
int matlab_format_file_counter
Definition: spp.h:59
int test
Definition: spp.h:62