Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8480


Ignore:
Timestamp:
08/13/12 17:35:16 (12 years ago)
Author:
spimming
Message:

#1894:

  • fixed problem with edge category in XmlDataSource
  • initial version for new DIMACS data source
Location:
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/HeuristicLab.Problems.RoutePlanning.csproj

    r8438 r8480  
    4646    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    4747    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     48    <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL" />
    4849    <Reference Include="System" />
    4950    <Reference Include="System.Core" />
     
    5657  </ItemGroup>
    5758  <ItemGroup>
     59    <Compile Include="DIMACS\DIMACSDataSource.cs" />
    5860    <Compile Include="Graph\Edge.cs" />
    5961    <Compile Include="Graph\Graph.cs" />
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm.Data/XmlDataSource.cs

    r8462 r8480  
    11
    2 using System;
    32using System.Collections.Generic;
    43using System.IO;
     
    9291          graph.AddVertex(v1);
    9392          Vertex v2 = new Vertex(nodes[i + 1].Id, nodes[i + 1].Longitude, nodes[i + 1].Latitude);
    94           if (v1.Id == 370626403) {
    95             Console.WriteLine();
    96           }
     93
     94          // ---------------------------------------
     95          //long id = 314973778;
     96          //if (v1.Id == id || v2.Id == id) {
     97          //  Console.WriteLine();
     98          //}
     99          // ---------------------------------------
    97100          graph.AddVertex(v2);
     101          short category = (short)way.HighwayTag;
    98102          if (way.OneWay) {
    99             Edge<Vertex> edge = new Edge<Vertex>(v1, v2);
    100             edge.Category = (short)way.HighwayTag;
     103            Edge<Vertex> edge = new Edge<Vertex>(v1, v2, category);
    101104            graph.AddEdge(edge);
    102105          } else {
    103             Edge<Vertex> edgeForward = new Edge<Vertex>(v1, v2);
    104             edgeForward.Category = (short)way.HighwayTag;
     106            Edge<Vertex> edgeForward = new Edge<Vertex>(v1, v2, category);
    105107            graph.AddEdge(edgeForward);
    106108
    107             Edge<Vertex> edgeBackward = new Edge<Vertex>(v2, v1);
    108             edgeForward.Category = (short)way.HighwayTag;
     109            Edge<Vertex> edgeBackward = new Edge<Vertex>(v2, v1, category);
    109110            graph.AddEdge(edgeBackward);
    110111          }
    111 
    112112        }
    113113      }
Note: See TracChangeset for help on using the changeset viewer.