Changeset 101
- Timestamp:
- 01/29/08 12:55:11 (10 months ago)
- Files:
-
- trunk/extra/tsp/src/tsp.h (modified) (1 diff)
- trunk/extra/tsp/src/tsp_solver.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/extra/tsp/src/tsp.h
r100 r101 29 29 { 30 30 int id; 31 doublex;32 doubley;31 float8 x; 32 float8 y; 33 33 } point_t; 34 34 trunk/extra/tsp/src/tsp_solver.cpp
r100 r101 20 20 */ 21 21 22 #include <iostream>23 #include <fstream>24 25 22 extern "C" 26 23 { … … 246 243 population *pop=NULL; /* Population of solutions. */ 247 244 float score = 0.0; /* Best score */ 248 249 std::fstream myfile;250 myfile.open("/tmp/tsp_solver.log", std::ios::out|std::ios::app);251 245 252 246 source_id = source; … … 303 297 304 298 305 myfile<<"score = "<<score<<"\n"<<std::flush;306 myfile<<"fitness = "<<ga_get_entity_from_rank(pop,0)->fitness<<"\n"<<std::flush;307 myfile.close();308 309 299 if(score < ga_get_entity_from_rank(pop,0)->fitness) 310 300 {

