| 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 Mixed Postman Problem. */ |
| 6 |
/* */ |
| 7 |
/* (c) Copyright 2005-2008 Lehigh University. All Rights Reserved. */ |
| 8 |
/* */ |
| 9 |
/* This application was originally developed by Andrew Hofmann and was */ |
| 10 |
/* modified 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 _MPP_H |
| 18 |
#define _MPP_H |
| 19 |
|
| 20 |
/* Cut types */ |
| 21 |
|
| 22 |
#define ODD_CUT 1 |
| 23 |
|
| 24 |
/*---------------------------------------------------------------------------*\ |
| 25 |
* Use this data structure to store the value of any run-time parameters. |
| 26 |
\*---------------------------------------------------------------------------*/ |
| 27 |
|
| 28 |
typedef struct MPP_PARAMETERS{ |
| 29 |
/* Name of file containingthe instance data */ |
| 30 |
char infile[MAX_FILE_NAME_LENGTH + 1]; |
| 31 |
int test; |
| 32 |
char test_dir[MAX_FILE_NAME_LENGTH +1]; /* Test files directory */ |
| 33 |
}mpp_parameters; |
| 34 |
|
| 35 |
/*---------------------------------------------------------------------------*\ |
| 36 |
* Use this data structure to store the instance data after it is read in. |
| 37 |
\*---------------------------------------------------------------------------*/ |
| 38 |
|
| 39 |
typedef struct MPP_PROBLEM{ |
| 40 |
mpp_parameters par; /* the parameters */ |
| 41 |
int numnodes; /* the number of nodes in the graph */ |
| 42 |
int numedges; /* number of edges in the graph */ |
| 43 |
int numarcs; /* number of arcs in the graph */ |
| 44 |
int *cost; /* an array containing the costs */ |
| 45 |
int *head; /* an array containing the head of each arc/edge*/ |
| 46 |
int *tail; /* an array containing the tail of each arc/edge*/ |
| 47 |
char *type; /* an array containing the variable types */ |
| 48 |
int *is_odd; /* array containing a 1 if odd 0 if not*/ |
| 49 |
int odd_checker;/*indicates if odds have been checked */ |
| 50 |
}mpp_problem; |
| 51 |
|
| 52 |
#endif |