my @warningfs;
my @islandids;
+my $maxmaxdist=35;
+my $maxcpu=90;
+
my $qa= \%ARGS;
my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 };
my $maxdist;
-my $maxcountea=10;
-my $maxcpu=10;
+my $maxcountea=15;
</%perl>
</form>
<%perl>
-if (!$emsg && $maxdist > 30) {
- $emsg= "Searching for routes of more than 30 leagues is not".
+if (!$emsg && $maxdist > $maxmaxdist) {
+ $emsg= "Searching for routes of more than $maxmaxdist leagues is not".
" supported, sorry.";
}
if (!$child) {
my $cpu= BSD::Resource::RLIMIT_CPU;
my ($soft,$hard)= getrlimit($cpu);
- setrlimit($cpu,$maxcpu,$hard) or die $! if $soft>$maxcpu;
+ setrlimit($cpu,$maxcpu,$hard) or die $! if $hard<=$maxcpu;
exec @rsargs;
die $!;
}
<% $_ |h %>
<%perl>
}
- next unless
- m/^ \@ *\d+ ([ap])\# *\d+ \|.*\| *\d+ +(\d+) +(\d+) *\| ([0-9 ]+)$/;
- my ($ap,$isles) = (uc $1,$4);
+ next 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;
- my $item= { A => $2, P => $3 };
+ my $item= { A => $3, P => $4, Leagues => $2 };
my (@i, @a);
foreach (split / /, $isles) {
my ($name,$arch)= $isleinfo->($_);
<tbody>
<tr>
<th colspan=2>Profit
+<th>Dist.
<th>Archipelagoes
<th colspan=3>Route
<tr>
<th>Abs.
<th>Per.lg.
<th>
+<th>
<th>Start
<th>Via
<th>Finish
<tr class="datarow<% $datarow %>">
<td align=right><% $item->{A} |h %>
<td align=right><% $item->{P} |h %>
+<td align=right><% $item->{Leagues} |h %>
<td align=left><% join ', ', @{ $item->{Archs} } |h %>
<td align=left><% $item->{Start} |h %>,
<td align=left><% join ' ', map { $_.',' } @{ $item->{Vias} } |h %>