X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_routesearch;h=151824cdec7a8a77db75f0b6b1c0c1055a0da2fa;hp=6cf098ed82c63c8cfce1fe93fe6e889460415675;hb=59824f48d09192d1c535adecf5ee2e4ee2ed47d5;hpb=70ce19058c58f923f4957344502177202c7ee733 diff --git a/yarrg/web/query_routesearch b/yarrg/web/query_routesearch index 6cf098e..151824c 100644 --- a/yarrg/web/query_routesearch +++ b/yarrg/web/query_routesearch @@ -59,7 +59,7 @@ my @islandids; my $destspec; -my @maxmaxdist= qw(35 35 60); +my @maxmaxdist= qw(100 100 100); my $maxcpu=90; my $concur_lim=5; @@ -181,7 +181,7 @@ foreach my $k (qw(MaxMass MaxVolume MaxCapital)) { } push @rsargs, defined $routeparams->{LossPerLeaguePct} ? $routeparams->{LossPerLeaguePct}*0.01 : 1e-9; -push @rsargs, $routeparams->{MinProfit}; +push @rsargs, $routeparams->{MinProfit} // 0; push @rsargs, 'search',$maxdist, $maxcountea,$maxcountea; push @rsargs, $destspec; push @rsargs, @islandids; @@ -228,7 +228,7 @@ while (<$fh>) { } die unless m/^ \@ *\d+ ([ap])\# *\d+ \|.*\| *(\d+)lg *\| *\d+ +(\d+) +(\d+) *\| ([0-9 ]+)$/; my ($ap,$isles) = (uc $1,$5); - next if $results{$ap} && %{$results{$ap}} >= $maxcountea; + next if $results{$ap} && keys %{$results{$ap}} >= $maxcountea; my $item= { A => $3, P => $4, Leagues => $2 }; my (@i, @fi, @a); foreach (split / /, $isles) {