home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / APR94_1.ZIP / GA.ZIP / SOURCE.ZIP / MAIN.CPP < prev    next >
C/C++ Source or Header  |  1994-01-02  |  659b  |  28 lines

  1. #ifdef STANDALONE_TEST
  2.  
  3. #include "stdafx.h"
  4.  
  5. //Headers needed for EOS programs
  6. //You need EOS v1.1 to compile this code
  7. #include "eos.h"
  8.  
  9. //headers specific to graph GA
  10. #include "gdriver.h"
  11.  
  12. //when testing, used to specify graph and grid
  13. const OPT_DEGREE = 30 ;
  14. const NUM_NODES = 10 ; 
  15. const GRID_WIDTH = 6;
  16. const GRID_HEIGHT = 6 ;
  17. const double CONNECT_PROB = 0.2 ;
  18.  
  19.  
  20. void main()
  21. {
  22.     CGAGraphDriver testDriver(NUM_NODES, GRID_WIDTH,GRID_HEIGHT) ;
  23.     testDriver.GenerateRandomGraph(CONNECT_PROB) ;
  24.     printf("Initializing Population and Environment. Please Wait...\n\n") ;
  25.     testDriver.Optimize(OPT_DEGREE) ;
  26. }   
  27.  
  28. #endif //STANDALONE_TEST