- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/svn-release/Blis-0.94.1/Blis/examples/VRP/VrpMacros.h

Go to the documentation of this file.

    00001 /*===========================================================================*
    00002  * This file is part of a solver for the Vehicle Routing Problem             *
    00003  * developed using the BiCePS Linear Integer Solver (BLIS).                  *
    00004  *                                                                           *
    00005  * This solver is distributed under the Eclipse Public License as part of    *
    00006  * the COIN-OR repository (http://www.coin-or.org).                          *
    00007  *                                                                           *
    00008  * Authors: Yan Xu, Lehigh University                                        *
    00009  *          Ted Ralphs, Lehigh University                                    *
    00010  *                                                                           *
    00011  * Copyright (C) 2007 Yan Xu and Ted Ralphs.                                 *
    00012  * All Rights Reserved.                                                      *
    00013  *===========================================================================*/
    00014
    00015 #ifndef VrpMacros_h_
    00016 #define VrpMacros_h_
    00017
    00018 #if defined(_MSC_VER) || defined(__MNO_CYGWIN) || defined(__MINGW32__)
    00019 /* Different function call in Windows */
    00020 #define SRANDOM(seed) srand(seed)
    00021 #define RANDOM() rand()
    00022 #else
    00023 #define SRANDOM(seed) srandom(seed)
    00024 #define RANDOM() random()
    00025 #endif
    00026
    00027 /*approximates the number of trucks necessary to service a set of customers*/
    00028 #define BINS(weight, capacity) \
    00029 ((int) ceil(((double)weight)/((double)capacity)))
    00030
    00031 /*calculates the right hand side of a subtour elimination constraint*/
    00032 #define RHS(cust_num, weight, capacity) \
    00033 (cust_num-BINS(weight, capacity))
    00034
    00035 /*===========================================================================*/
    00036
    00037 #endif