+if ($qa->{ShowStalls}>=2) {
+ my $stallpoe= $dbh->prepare(<<END);
+SELECT max(qty*price) FROM buy WHERE stallid=?
+END
+ foreach my $stallid (sort { $a <=> $b } keys %stall_poe_limits) {
+ $stallpoe->execute($stallid);
+ my ($lim)= $stallpoe->fetchrow_array();
+ $stallpoe->finish();
+ $cplex.= "
+ ". sprintf("%-15s","poe_$stallid:")." ".
+ join(" + ", map {
+ sprintf "%d %s", $_->{Flow}{'dst_price'}, $_->{Var};
+ } @{ $stall_poe_limits{$stallid} }).
+ " <= $lim";
+ }
+ $cplex.= "\n";
+}
+