X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=73740ea346621e5b678a9641e2b9ef5911afc412;hb=1a64a4e4703ade43ff0b26150f8128969be0ec8b;hp=0da1fd80a81929454605e46df2064d56d26d3083;hpb=166893c6f6bd3e9b382aca095dc5ac80a22f89b7;p=ypp-sc-tools.db-test.git diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 0da1fd8..73740ea 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -41,6 +41,7 @@ $qa $max_mass $max_volume $lossperleaguepct +$max_capital <&| script &> da_pageload= Date.now(); @@ -451,6 +452,12 @@ foreach my $ci (0..($#islandids-1)) { join(" + ", map { ($_->{"unit$mv"}*1e-3).' f'.$_->{Ix} } @rel_flows). " <= $max"; } + if (defined $max_capital) { + $cplex .= " + ". sprintf("%-10s","capital_$ci:")." ". + join(" + ", map { ($_->{"org_price"}).' f'.$_->{Ix} } @rel_flows). + " <= $max_capital"; + } $cplex.= "\n"; }