chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Normalise commodity name case (from uploads)
[ypp-sc-tools.web-live.git]
/
yarrg
/
web
/
query_routesearch
diff --git
a/yarrg/web/query_routesearch
b/yarrg/web/query_routesearch
index 6cf098ed82c63c8cfce1fe93fe6e889460415675..126c4e804d860a807d5abfb57b5dd36dd66a728c 100644
(file)
--- a/
yarrg/web/query_routesearch
+++ b/
yarrg/web/query_routesearch
@@
-51,6
+51,8
@@
$allargs
</%args>
<%perl>
</%args>
<%perl>
+no warnings qw(exec);
+
use BSD::Resource;
my $emsg;
use BSD::Resource;
my $emsg;
@@
-59,7
+61,7
@@
my @islandids;
my $destspec;
my $destspec;
-my @maxmaxdist= qw(
35 35 6
0);
+my @maxmaxdist= qw(
100 100 10
0);
my $maxcpu=90;
my $concur_lim=5;
my $maxcpu=90;
my $concur_lim=5;
@@
-181,7
+183,7
@@
foreach my $k (qw(MaxMass MaxVolume MaxCapital)) {
}
push @rsargs, defined $routeparams->{LossPerLeaguePct}
? $routeparams->{LossPerLeaguePct}*0.01 : 1e-9;
}
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;
push @rsargs, 'search',$maxdist, $maxcountea,$maxcountea;
push @rsargs, $destspec;
push @rsargs, @islandids;
@@
-228,7
+230,7
@@
while (<$fh>) {
}
die unless m/^ \@ *\d+ ([ap])\# *\d+ \|.*\| *(\d+)lg *\| *\d+ +(\d+) +(\d+) *\| ([0-9 ]+)$/;
my ($ap,$isles) = (uc $1,$5);
}
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) {
my $item= { A => $3, P => $4, Leagues => $2 };
my (@i, @fi, @a);
foreach (split / /, $isles) {