Dip  0.92.4
user.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 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 (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 _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 */
32  int test;
33  char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */
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 */
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 */
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
struct USER_PROBLEM user_problem
#define PROTO(x)
Definition: sym_proto.h:27
int match2[MAXNODES *(MAXNODES-1)/2]
Definition: user.h:48
char infile[MAX_FILE_NAME_LENGTH+1]
Definition: user.h:31
#define MAX_FILE_NAME_LENGTH
Definition: sym_proto.h:18
int index[MAXNODES][MAXNODES]
Definition: user.h:50
int cost[MAXNODES][MAXNODES]
Definition: user.h:44
int numnodes
Definition: user.h:42
char test_dir[MAX_FILE_NAME_LENGTH+1]
Definition: user.h:33
int test
Definition: user.h:32
user_parameters par
Definition: user.h:40
struct USER_PARAMETERS user_parameters
#define MAXNODES
Definition: user.h:23
int match1[MAXNODES *(MAXNODES-1)/2]
Definition: user.h:46