Debian Codegraph @

SYMPHONY/Applications/MATCH/include/user.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 Matching Problem. */
6 /* */
7 /* (c) Copyright 2005-2008 Michael Trick and Ted Ralphs. All Rights Reserved.*/
8 /* */
9 /* This application was originally written by Michael Trick and was modified */
10 /* by 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 _USER_H
18 #define _USER_H
19
20 #include "sym_master.h"
21 #include "sym_macros.h"
22
23 #define MAXNODES 200
24
25 /*---------------------------------------------------------------------------*\
26 * Use this data structure to store the value of any run-time parameters.
27 \*---------------------------------------------------------------------------*/
28
29 typedef struct USER_PARAMETERS{
30 /* Name of file containingthe instance data */
31 char infile[MAX_FILE_NAME_LENGTH + 1];
32 int test;
33 char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */
34 }user_parameters;
35 /*---------------------------------------------------------------------------*\
36 * Use this data structure to store the instance data after it is read in.
37 \*---------------------------------------------------------------------------*/
38
39 typedef struct USER_PROBLEM{
40 user_parameters par; /* the parameters */
41 /* Number of nodes */
42 int numnodes;
43 /* Cost of matching i and j */
44 int cost[MAXNODES][MAXNODES];
45 /* match1[k] is the first component of the assignment with index k */
46 int match1[MAXNODES*(MAXNODES-1)/2];
47 /* match2[k] is the first component of the assignment with index k */
48 int match2[MAXNODES*(MAXNODES-1)/2];
49 /* index[i][j] is the index of the variable assoc. w/ matching i and j */
50 int index[MAXNODES][MAXNODES];
51 }user_problem;
52
53
54 int match_read_data PROTO((user_problem *prob, char *infile));
55 int match_load_problem PROTO((sym_environment *env, user_problem *prob));
56
57 #endif