X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=c7dd03e5d0166e63c4054ed3561450e8824ffff1;hp=68c727cdbd1aec41407534e2c1047e5b1d95b14b;hb=53b0011bf5dd8b8b0686848ba5e0a384de1b9326;hpb=c9225ff45ee5e69855cb24cfb648d903dbba54a7 diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 68c727c..c7dd03e 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -261,6 +261,15 @@ foreach my $v (qw(MaxMass MaxVolume)) { <& dumptable:end, qa => $qa &> % } +% if (@islandids==1) { +% if (defined $islandids[0]) { +Searched for arbitrage trades only. +% } else { +Searched for arbitrage trades only, in <% $archipelagoes[0] |h %> +[?]. +% } +% } + <%perl> my @sail_total; @@ -524,7 +533,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; @@ -565,6 +574,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 {