Changeset 1615 for stable/2.6/Cbc/scripts/parse.awk
- Timestamp:
- Mar 21, 2011 11:48:47 PM (10 years ago)
- Location:
- stable/2.6
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
stable/2.6
- Property svn:mergeinfo changed
/trunk (added) merged: 1539-1540,1555-1558
- Property svn:mergeinfo changed
-
stable/2.6/Cbc
- Property svn:mergeinfo changed
/trunk/Cbc merged: 1539-1540,1555-1558
- Property svn:mergeinfo changed
-
stable/2.6/Cbc/scripts/parse.awk
r1540 r1615 5 5 #* * 6 6 #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 7 # $Id: parse.awk,v 1. 1 2010/10/07 16:14:36bzfwolte Exp $7 # $Id: parse.awk,v 1.2 2010/12/14 08:38:22 bzfwolte Exp $ 8 8 9 9 function abs(x) … … 20 20 } 21 21 BEGIN { 22 printf("------------------ +------+-------+-------+--------+---------\n");23 printf("Name | Gap%% | Nodes | Time | Status | Solution \n");24 printf("------------------ +------+-------+-------+--------+---------\n");22 printf("----------------------------+----------------+----------------+------+-------+-------+--------+---------\n"); 23 printf("Name | Dual Bound | Primal Bound | Gap%% | Nodes | Time | Status | Solution \n"); 24 printf("----------------------------+----------------+----------------+------+-------+-------+--------+---------\n"); 25 25 26 26 infty = +1e+20; … … 28 28 largegap = 1e+04; 29 29 30 # initialize summary data 31 nsolved = 0; 32 nstopped = 0; 33 nfailed = 0; 34 30 35 # initialize data to be set in parse_<solver>.awk 31 36 solver = "?"; 32 37 solverversion = "?"; 33 lps = "none"; 34 lpsversion = "-"; 38 solverremark = ""; 35 39 } 36 40 # instance name … … 56 60 aborted = 1; 57 61 timeout = 0; 58 solstatus = "unkown"; 62 solstatus = "none"; 63 read_error = 0; 59 64 } 60 65 # time … … 63 68 /@05/ { timelimit = $2; } 64 69 # solution status 70 /Read SOL:/ { 71 solstatus = "--"; 72 } 65 73 /Check SOL:/ { 66 74 intcheck = $4; … … 92 100 # determine solving status 93 101 status = ""; 94 if( aborted ) 95 status = "abort"; 102 if( aborted && !read_error) 103 status = "abort"; 104 else if (aborted && read_error) 105 status = "noread"; 96 106 else if( timeout ) 97 status = "timeout";107 status = "stopped"; 98 108 else 99 109 status = "ok"; 100 110 101 # compute gap 111 # determine overall status from solving status and solution status: 112 113 # instance solved correctly (including case that no solution was found) 114 if( status == "ok" && (solstatus == "ok" || solstatus == "--") ) 115 nsolved++; 116 # incorrect solving process or infeasible solution (including errors with solution checker) 117 else if( status == "abort" || (solstatus == "fail" || solstatus == "error") ) 118 nfailed++; 119 # stopped due to imposed limits 120 else if ( status == "stopped" ) 121 nstopped++; 122 else 123 nnoread++; 124 125 # compute gap 102 126 temp = pb; 103 127 pb = 1.0*temp; … … 125 149 gapstr = " Large"; 126 150 127 printf("%- 18s %6s %7d %7d %8s %9s\n", prob, gapstr, bbnodes, time, status, solstatus);151 printf("%-28s %16.9g %16.9g %6s %7d %7d %8s %9s\n", prob, db, pb, gapstr, bbnodes, time, status, solstatus); 128 152 } 129 153 END { 130 printf("------------------+------+-------+-------+--------+---------\n"); 154 printf("----------------------------+----------------+----------------+------+-------+-------+--------+---------\n"); 155 printf("\n"); 156 printf("solved/stopped/noread/failed: %d/%d/%d/%d\n", nsolved, nstopped, nnoread, nfailed); 157 printf("\n"); 131 158 printf("@02 timelimit: %g\n", timelimit); 132 printf("@01 %s(%s)%s (%s)\n", solver, solverversion, lps, lpsversion);159 printf("@01 %s(%s)%s\n", solver, solverversion, solverremark); 133 160 }
Note: See TracChangeset
for help on using the changeset viewer.