|
|
@@ -14,7 +14,7 @@
|
|
|
|
|
|
<xsl:param name="PE_Price" select="2500"/>
|
|
|
<xsl:param name="Cable_Price" select="3"/>
|
|
|
- <xsl:param name="max_combinate_groups_elements" select="14"/> <!-- po ile wezlow mamy grupowac do wyliczania kombinacji kosztow -->
|
|
|
+ <xsl:param name="max_combinate_groups_elements" select="12"/> <!-- po ile wezlow mamy grupowac do wyliczania kombinacji kosztow -->
|
|
|
<xsl:param name="logic" select="'grouped'"/> <!-- tutaj robi grupy po $max_combinate_groups_elements -->
|
|
|
<!--<xsl:param name="logic" select="'sorted'"/>--> <!-- tutaj robi grupy ale analizyje w grupie tylko wazniejsze/bardziej oblozone wezly -->
|
|
|
|
|
|
@@ -30,7 +30,12 @@
|
|
|
|
|
|
|
|
|
<xsl:template match="edge_joins_filled_paths">
|
|
|
-
|
|
|
+ <xsl:message>Running script for params:
|
|
|
+ PE_Price=<xsl:value-of select="$PE_Price"/>
|
|
|
+ Cable_Price=<xsl:value-of select="$Cable_Price"/>
|
|
|
+ max_combinate_groups_elements=<xsl:value-of select="$max_combinate_groups_elements"/>
|
|
|
+ logic=<xsl:value-of select="$logic"/> .EOF
|
|
|
+ </xsl:message>
|
|
|
<xsl:variable name="edge_joins_filled_paths_len">
|
|
|
<xsl:for-each select="item">
|
|
|
<xsl:sort select="number(asText/@len)" order="descending"/>
|
|
|
@@ -54,7 +59,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <xsl:template match="Path" mode="PointMatrixGroup">
|
|
|
+ <xsl:template match="Path" mode="PointMatrixGroup">
|
|
|
<Path>
|
|
|
<xsl:variable name="edge_joins_filled_path" select=" doc(concat('edge_joins_filled_paths/edge_joins_filled_paths.',@id,'.xml'))"/>
|
|
|
<xsl:attribute name="id" select="@id"/>
|
|
|
@@ -64,7 +69,9 @@
|
|
|
<xsl:attribute name="len" select="@len"/>
|
|
|
<xsl:attribute name="Count" select="count($edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString)"/>
|
|
|
<xsl:variable name="len" select="@len"/>
|
|
|
-
|
|
|
+ <xsl:message> Path dla ID_Way=<xsl:value-of select="$ID_Way"/>; len=<xsl:value-of select="@len"/>; Count=<xsl:value-of select="count($edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString)"/>
|
|
|
+ Points_cnt=<xsl:value-of select="@Points_cnt"/>
|
|
|
+ </xsl:message>
|
|
|
<!--<xsl:variable name="edge_joins_filled_paths" select="collection( 'edge_joins_filled_paths?select=*.xml;recurse=yes')"/>-->
|
|
|
|
|
|
<!--<EdgeWayJoinsPair>
|
|
|
@@ -181,6 +188,11 @@
|
|
|
<PointMatrixGroupPos>
|
|
|
<xsl:variable name="elements_cnt_Pos" select="count(current-group()[@point_count > 0])"/>
|
|
|
<xsl:variable name="bit_max_Pos" select="round(sum( current-group()/@disttopkt ) div ( $PE_Price div 20 ) )"/>
|
|
|
+ <xsl:message>Nowa grupa Ways:<xsl:value-of select="@PosCut3GrId"/>; distanceGr=<xsl:value-of select="@PosCut3GrId"/>;elements_cnt_Pos=<xsl:value-of select="$elements_cnt_Pos"/>
|
|
|
+ @bit_max_Pos=<xsl:value-of select="$bit_max_Pos"/>; @id_path=<xsl:value-of select="@id_path"/>;
|
|
|
+ point_count_Pos=<xsl:value-of select="sum(current-group()/@point_count)"/>; len_sum=<xsl:value-of select="sum(current-group()/@len)"/> ;
|
|
|
+ distanceBeg/distanceEnd= <xsl:value-of select="min(current-group()/number(@distance))"/>/<xsl:value-of select="max(current-group()/number(@distance))"/>
|
|
|
+ </xsl:message>
|
|
|
<xsl:attribute name="distanceGr" select="@PosCut3GrId "/> <!-- bylo current-grouping-key() -->
|
|
|
<xsl:attribute name="elements_cnt_Pos" select="$elements_cnt_Pos"/>
|
|
|
<xsl:attribute name="bit_max_Pos" select="$bit_max_Pos"/>
|
|
|
@@ -390,11 +402,12 @@
|
|
|
</xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
</xsl:variable>
|
|
|
- <!--<xsl:copy-of select="$best"/>-->
|
|
|
+ <xsl:copy-of select="$best"/>
|
|
|
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="$bit = $max_bit">
|
|
|
<koniec_wariantow>
|
|
|
+ <xsl:message>#410 OK - przeliczony wariant bit=<xsl:value-of select="$best"/> ( nr <xsl:value-of select="$variant"/>;) </xsl:message>
|
|
|
<xsl:attribute name="best_variant" select="$best_variant"/>
|
|
|
<xsl:for-each select="$candidates/bp:Path_Point">
|
|
|
<xsl:sort select="@distance"/>
|