Debian Codegraph @

SYMPHONY/Applications/SPP/include/spp.h

raw
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 ([email protected]) */
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
25 /*---------------------------------------------------------------------------*\
26 * Use this data structure to store the value of any run-time parameters.
27 \*---------------------------------------------------------------------------*/
28
29 /* infile -- contains the problem matrix (in our format only right now)
30 our_format_file -- when the problem matrix is needed to be saved in
31 our format, a file name is generated from this
32 name and our_format_file_counter. If the counter
33 is negative, won't save the matrix anywhere.
34 matlab_format_file -- when the sparsity structure of the problem
35 matrix is interesting, it can be saved in this
36 format (a nzcnt+1 by 3 table that matlab reads in to
37 form a sparse matrix), see show_sparsity.m
38 The counter works the same way as above.
39
40 dupc_at_loadtime -- if set, delete duplicate columns that are next to
41 each other when loading in the problem.
42
43 granularity -- the minimum difference between the objective values of two
44 (integral) feasible solutions if the objective values are
45 not considered the same minus epsilon.
46 (e.g., if all objective coefficients are integers then
47 granularity is 1.00 - epsilon, say .999) */
48
49 typedef struct SPP_PARAMETERS{
50 /* Name of file containing the instance data */
51 char infile[MAX_FILE_NAME_LENGTH + 1];
52
53 int dupc_at_loadtime;
54
55 char our_format_file[MAX_FILE_NAME_LENGTH];
56 int our_format_file_counter;
57
58 char matlab_format_file[MAX_FILE_NAME_LENGTH];
59 int matlab_format_file_counter;
60
61 double granularity;
62 int test;
63 char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */
64 int verbosity;
65 }spp_parameters;
66
67 /*---------------------------------------------------------------------------*\
68 * Use this data structure to store the instance data after it is read in.
69 \*---------------------------------------------------------------------------*/
70
71 typedef struct SPP_PROBLEM{
72
73 spp_parameters *par; /* Parameters */
74
75 statistics *stat; /* statistics */
76
77 int input_type; /* the type of the problem instance */
78
79 int feasibility; /* feasibility status of the problem */
80 double feas_value; /* obj value of so far best feas soln */
81 int feas_sol_length; /* number of vars in ... */
82 int *feas_sol; /* names of vars in ... */
83
84 int orig_colnum;
85 int orig_rownum;
86 int *orig_names;
87 double *orig_obj;
88
89 col_ordered *cmatrix; /* problem matrix (col ordered) */
90
91 }spp_problem;
92
93 #endif