/home/coin/SVN-release/CoinAll-1.1.0/SYMPHONY/Applications/MATCH/include/user.h

Go to the documentation of this file.
00001 /*===========================================================================*/
00002 /*                                                                           */
00003 /* This file is part of a demonstration application for use with the         */
00004 /* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */
00005 /* the Matching Problem.                                                     */
00006 /*                                                                           */
00007 /* (c) Copyright 2005-2008 Michael Trick and Ted Ralphs. All Rights Reserved.*/
00008 /*                                                                           */
00009 /* This application was originally written by Michael Trick and was modified */
00010 /* by Ted Ralphs (tkralphs@lehigh.edu).                                      */
00011 /*                                                                           */
00012 /* This software is licensed under the Common Public License. Please see     */
00013 /* accompanying file for terms.                                              */
00014 /*                                                                           */
00015 /*===========================================================================*/
00016 
00017 #ifndef _USER_H
00018 #define _USER_H
00019 
00020 #include "sym_master.h"
00021 #include "sym_macros.h"
00022 
00023 #define MAXNODES 200
00024 
00025 /*---------------------------------------------------------------------------*\
00026  * Use this data structure to store the value of any run-time parameters.
00027 \*---------------------------------------------------------------------------*/
00028 
00029 typedef struct USER_PARAMETERS{
00030    /* Name of file containingthe instance data */
00031    char             infile[MAX_FILE_NAME_LENGTH + 1];
00032    int              test;
00033    char             test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */
00034 }user_parameters;
00035 /*---------------------------------------------------------------------------*\
00036  * Use this data structure to store the instance data after it is read in.
00037 \*---------------------------------------------------------------------------*/
00038 
00039 typedef struct USER_PROBLEM{
00040    user_parameters  par;        /* the parameters */
00041    /* Number of nodes */
00042    int              numnodes;
00043    /* Cost of matching i and j */
00044    int              cost[MAXNODES][MAXNODES];
00045    /* match1[k] is the first component of the assignment with index k */
00046    int              match1[MAXNODES*(MAXNODES-1)/2];
00047    /* match2[k] is the first component of the assignment with index k */
00048    int              match2[MAXNODES*(MAXNODES-1)/2]; 
00049    /* index[i][j] is the index of the variable assoc. w/ matching i and j */
00050    int              index[MAXNODES][MAXNODES];
00051 }user_problem;
00052 
00053 
00054 int match_read_data PROTO((user_problem *prob, char *infile));
00055 int match_load_problem PROTO((sym_environment *env, user_problem *prob));
00056 
00057 #endif

Generated on Sun Nov 14 14:06:41 2010 for Coin-All by  doxygen 1.4.7