|
|
@@ -15,6 +15,8 @@
|
|
|
<xsl:param name="PE_Price" select="1500"/>
|
|
|
<xsl:param name="Cable_Price" select="10"/>
|
|
|
|
|
|
+ <xsl:param name="edge_paths_with_PE.xml"/>
|
|
|
+
|
|
|
<!-- bedziemy od najdluzszej drogi starac sie rozmiescic PE w oparciu o rozmieszczenie klientow oraz odleglosci -->
|
|
|
|
|
|
|
|
|
@@ -93,6 +95,7 @@
|
|
|
<xsl:attribute name="pos" select="position()"/>
|
|
|
<xsl:attribute name="not_id" select="@not_id"/>
|
|
|
<xsl:attribute name="len" select="@len"/>
|
|
|
+ <xsl:attribute name="id_path" select="@id_path"/>
|
|
|
<xsl:variable name="Points" select="count(Points)"/>
|
|
|
<xsl:variable name="Ways" select="count(Ways)"/>
|
|
|
<xsl:choose>
|
|
|
@@ -124,13 +127,14 @@
|
|
|
<xsl:attribute name="disttopkt" select="$disttopkt" />
|
|
|
<xsl:variable name="cost_dist" select="$Cable_Price * $disttopkt * @point_count"/>
|
|
|
<xsl:attribute name="cost_dist" select="$cost_dist"/>
|
|
|
+
|
|
|
<xsl:if test="$cost_dist > $PE_Price">
|
|
|
<xsl:attribute name="cut_by_pe" select="1"/>
|
|
|
</xsl:if>
|
|
|
<xsl:attribute name="not_id" select="@not_id"/>
|
|
|
</xsl:when>
|
|
|
</xsl:choose>
|
|
|
-
|
|
|
+ <xsl:attribute name="id_path" select="@id_path"/>
|
|
|
<xsl:copy-of select="@point_count"/>
|
|
|
<xsl:copy-of select="@pos"/>
|
|
|
<xsl:copy-of select="@len"/>
|
|
|
@@ -155,8 +159,6 @@
|
|
|
<xsl:attribute name="elements_cnt_Pos" select="$elements_cnt_Pos"/>
|
|
|
<xsl:attribute name="bit_max_Pos" select="$bit_max_Pos"/>
|
|
|
<xsl:attribute name="point_count_Pos" select="sum(current-group()/@point_count)"/>
|
|
|
-
|
|
|
-
|
|
|
<xsl:for-each select="current-group()">
|
|
|
<xsl:copy-of select="."/>
|
|
|
</xsl:for-each>
|
|
|
@@ -180,8 +182,9 @@
|
|
|
<xsl:attribute name="pos" select="@pos"/>
|
|
|
<xsl:attribute name="len" select="@len"/>
|
|
|
<xsl:attribute name="distance" select="@distance"/>
|
|
|
- <xsl:attribute name="X" select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString[@not_id = current()/@not_id]/@X"/>
|
|
|
- <xsl:attribute name="Y" select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString[@not_id = current()/@not_id]/@Y"/>
|
|
|
+ <xsl:attribute name="id_path" select="@id_path"/>
|
|
|
+ <xsl:attribute name="X" select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString[@id_path = current()/@id_path]/@X"/>
|
|
|
+ <xsl:attribute name="Y" select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString[@id_path = current()/@id_path]/@Y"/>
|
|
|
</bp:Path_Point>
|
|
|
</xsl:for-each>
|
|
|
</xsl:for-each>
|