Parcourir la source

potworzone zmienne, ale czas aby chodzilo

a.binder il y a 9 ans
Parent
commit
8cb2594799
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      SE/dev/php-cli/edge_paths_with_PE_controll.xsl

+ 4 - 1
SE/dev/php-cli/edge_paths_with_PE_controll.xsl

@@ -312,7 +312,10 @@
                 </xsl:choose>
                 </xsl:choose>
             </xsl:variable>
             </xsl:variable>
             <!-- tune max bit-->
             <!-- tune max bit-->
-            <xsl:variable name="$bit_max">
+            <xsl:variable name="bit_max">
+                <xsl:variable name="elements_cnt" select="count($EconomicDistanceCut2/EconomicDistanceCut2/distance2[number(@point_count) &gt; number(0) ])"/>
+                <xsl:variable name="cost_dist_Cnt" select="count($EconomicDistanceCut2/EconomicDistanceCut2/distance2[ ( number(@cost_dist) &gt; number($PE_Price) ) or number(@len) &gt; ( number($PE_Price) div number($Cable_Price) )  ])"/>
+                <xsl:variable name="bit_max" select="round($len  div  ( $PE_Price div $Cable_Price ) + $cost_dist_Cnt  ) + 1"/>
                 <xsl:choose>
                 <xsl:choose>
                     <xsl:when test=" number($bit_max) = number(1)">
                     <xsl:when test=" number($bit_max) = number(1)">
                         <xsl:value-of select="2"/>
                         <xsl:value-of select="2"/>