home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 2.ddi / TSP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  2.2 KB  |  69 lines

  1. /* 11:00 30-Aug-87 (tsp.h) travelling Salesman Problem header file   */
  2.  
  3. /************************************************************************
  4.  * Copyright(C) 1988 Neural-Ware Inc          *
  5.  * 103 Buckskin Court, Sewickley, PA 15143, United States of America  *
  6.  *                  *
  7.  * All rights reserved.  No part of this program may be reproduced, *
  8.  * stored in a retrieval system, or tramsmitted, in any form or by any  *
  9.  * means, electronic, mechanical, photocopying, recording or otherwise  *
  10.  * without the prior written permission of the copyright owner,   *
  11.  * Neural-Ware, Inc.              *
  12.  ************************************************************************
  13.  */
  14.  
  15. /************************************************************************/
  16. /*                  */
  17. /*  TSP build structures for cities         */
  18. /*                  */
  19. /************************************************************************/
  20.  
  21. #define DEFAULT_CITY_FILE_NAME "city"   /* the default name for read/write */
  22. #define DEFAULT_NET_FILE_NAME "tsp.ins" /* the default file name for write */
  23.  
  24. /* Network energy functions */
  25. #define HOPF 0
  26. #define SZU  1
  27. #define Other 2
  28.  
  29. #ifdef SUN
  30. #define MAX_NUM_CITIES 30
  31. #else
  32. #define MAX_NUM_CITIES 15
  33. #endif
  34.  
  35. #ifdef SUN
  36. #define MAX_CITY_NAME_SIZE  30
  37. #else
  38. #define MAX_CITY_NAME_SIZE  10
  39. #endif
  40.  
  41. struct city {
  42.   char name[MAX_CITY_NAME_SIZE];
  43.   REAL xloc;
  44.   REAL yloc;
  45.   REAL dist[MAX_NUM_CITIES];
  46.   };
  47.  
  48. typedef struct city CITY;
  49.  
  50. /************************************************************************/
  51. /*                  */
  52. /*  TSP constants for network build         */
  53. /*                  */
  54. /************************************************************************/
  55.  
  56.  
  57. #define NLAY  5   /* layer control blocks to allocate */
  58. #define NPES  5*MAX_NUM_CITIES*MAX_NUM_CITIES /* # of pes to work with */
  59. #define NCONN_PER_CITY  4
  60. #define NCONN NCONN_PER_CITY*MAX_NUM_CITIES /* max # conns in a PE */
  61.  
  62.  
  63. #define NTEST 1       /* number of test inputs */
  64. #define NINPUT  MAX_NUM_CITIES*MAX_NUM_CITIES   /* number of inputs/test */
  65. #define NOUTPUT MAX_NUM_CITIES*MAX_NUM_CITIES   /* number of outputs/test */
  66.  
  67. #define FIXED_WT 1
  68. #define MOD_WT   0
  69.