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 Vehicle Routing Problem and the Traveling Salesman Problem.           */
6 /*                                                                           */
7 /* (c) Copyright 2000-2013 Ted Ralphs. All Rights Reserved.                  */
8 /*                                                                           */
9 /* This application was developed by Ted Ralphs (ted@lehigh.edu)             */
10 /*                                                                           */
11 /* This software is licensed under the Eclipse Public License. Please see    */
12 /* accompanying file for terms.                                              */
13 /*                                                                           */
14 /*===========================================================================*/
15 
16 #ifndef _VRP_MACROS_H
17 #define _VRP_MACROS_H
18 
19 /* SYMPHONY include files */
20 #include "sym_proto.h"
21 
22 #define CHECK_DEBUG_PAR(x, y) \
23 if (x != 0 && x != 4) {                                               \
24    (void) fprintf(stderr, "\nio: illegal debug parameter %s\n\n", y); \
25    exit(1);                                                           \
26 }
27 
28 #define READ_FLOAT_PAR(par)						\
29 if (sscanf(value, "%f", &(par)) != 1){					\
30    (void) fprintf(stderr, "\nio: error reading parameter %s\n\n", key);	\
31    exit(1);								\
32 }
33 
34 void BOTH_ENDS PROTO((int index, int *vh, int *vl));
35 int NEAREST_INT PROTO((double num));
36 int INDEX PROTO((int v0, int v1));
37 int BINS PROTO((int weight, int capacity));
38 int RHS PROTO((int cust_num, int weight, int capacity));
39 
40 #endif
41