| 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 |
#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 |
|
| 57 |
char our_format_file[MAX_FILE_NAME_LENGTH]; |
| 58 |
int our_format_file_counter; |
| 59 |
|
| 60 |
char matlab_format_file[MAX_FILE_NAME_LENGTH]; |
| 61 |
int matlab_format_file_counter; |
| 62 |
|
| 63 |
double granularity; |
| 64 |
int test; |
| 65 |
char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */ |
| 66 |
int verbosity; |
| 67 |
|
| 68 |
}spp_parameters; |
| 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 */ |
| 77 |
spp_lp_params *lp_par; |
| 78 |
spp_cg_params *cg_par; |
| 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 |
|
| 96 |
}spp_problem; |
| 97 |
|
| 98 |
#endif |