\n" if $qa->{'debug'}; my $found_section= 0; @@ -524,7 +550,7 @@ if ($qa->{'debug'}) { $found_section= 1; next; } - if (m/^Objective:\s+totalprofit = (\d+\.\d*) /) { + if (m/^Objective:\s+totalprofit = (\d+(?:\.\d*)?) /) { $expected_total_profit= $1; } next unless $found_section==1; @@ -544,8 +570,8 @@ if ($qa->{'debug'}) { my ($varname, $qty) = m/^ \s* \d+ \s+ (\w+) \s+ (?: [A-Z*]+ \s+ )? - ([0-9.]+) \s - /x or die "$_ ?"; + ([+-e0-9.]+) \s + /x or die "$cplex \n==\n $glpsol_out $_ ?"; if ($varname =~ m/^f(\d+)s(\d+)_/) { my ($ix,$orgix) = ($1,$2); my $flow= $flows[$ix] or die; @@ -565,6 +591,7 @@ if ($qa->{'debug'}) { my $prerr= "\n=====\n$cplex\n=====\n$glpsol_out\n=====\n "; pipethrough_run_finish($output,$prerr); map { defined $_->{OptQty} or die "$prerr $_->{Flow}{Ix}" } @subflows; + defined $expected_total_profit or die "$prerr ?"; }; $addcols->({ DoReverse => 1, TotalSubflows => 1, Special => sub { @@ -596,11 +623,20 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( + + % }
+Generated by YARRG at <% + sprintf "%04d-%02d-%02d %02d:%02d:%02d UTC", + $tl[5]+1900, @tl[4,3,2,1,0] + |h %>. % } % if ($optimise) { # ========== TRADING PLAN ========== @@ -613,9 +649,16 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( %
"; +% my ($c)= qw(40 00)[$_[0]]; +% return " | ||||||
"; +% }; +% % foreach my $i (0..$#islandids) { - | ||||||
% $iquery->execute($islandids[$i]); % my ($islandname) = $iquery->fetchrow_array(); @@ -645,7 +688,6 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( #print " [[ i $i od $od " if $qa->{'debug'}; foreach my $sf (@subflows) { my $f= $sf->{Flow}; - next if $f->{Suppress}; next unless $sf->{ucfirst $od} == $i; #print " FLOW $f->{Ix} SUB #$sf->{Org}..$sf->{Dst} " # if $qa->{'debug'}; @@ -720,12 +762,12 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( (Data age: <% prettyprint_age($age) %>) % } elsif (!defined $total) { % $total= 0; - | ||||||
Total distance: <% $total_dist %> leagues. | Overall net cash flow | <%
@@ -831,14 +873,6 @@ END
<&| query_age:agestable, now => $now, fetchrow => $fetchrow &>
Islands shown in reverse order of visits. &> -% } else { -% my @tl= gmtime $now or die $!; -
-Generated by YARRG at <%
- sprintf "%04d-%02d-%02d %02d:%02d:%02d UTC",
- $tl[5]+1900, @tl[4,3,2,1,0]
- |h %>.
-%#
% }
% if (!printable($m)) {
@@ -847,7 +881,7 @@ Generated by YARRG at <%
% my $cdspan= $qa->{ShowStalls} ? ' colspan=2' : '';
% my $cdstall= $qa->{ShowStalls} ? '
% } # !printable
|