public SeedIndustryData() { Industrys = new StaticDictionary<StaticIndustry>(); StaticIndustry industry; industry = AddIndustry("Roma Industry", "industry_roma"); Industrys.Add(industry.TagName, industry); industry = AddIndustry("Velathri Industry", "industry_velathri"); Industrys.Add(industry.TagName, industry); industry = AddIndustry("Ariminum Industry", "industry_ariminum"); Industrys.Add(industry.TagName, industry); }
public SeedFarmData() { Farms = new StaticDictionary <StaticFarm>(); StaticFarm farm; farm = AddFarm("Roma Farm", "farm_roma"); Farms.Add(farm.TagName, farm); farm = AddFarm("Velathri Farm", "farm_velathri"); Farms.Add(farm.TagName, farm); farm = AddFarm("Ariminum Farm", "farm_ariminum"); Farms.Add(farm.TagName, farm); }
public SeedFarmData() { Farms = new StaticDictionary<StaticFarm>(); StaticFarm farm; farm = AddFarm("Roma Farm", "farm_roma"); Farms.Add(farm.TagName, farm); farm = AddFarm("Velathri Farm", "farm_velathri"); Farms.Add(farm.TagName, farm); farm = AddFarm("Ariminum Farm", "farm_ariminum"); Farms.Add(farm.TagName, farm); }
public SeedPortData() { Ports = new StaticDictionary <StaticPort>(); StaticPort port; port = AddPort("Roma Port", "port_roma"); Ports.Add(port.TagName, port); port = AddPort("Velathri Port", "port_velathri"); Ports.Add(port.TagName, port); port = AddPort("Ariminum Port", "port_ariminum"); Ports.Add(port.TagName, port); }
public SeedPortData() { Ports = new StaticDictionary<StaticPort>(); StaticPort port; port = AddPort("Roma Port", "port_roma"); Ports.Add(port.TagName, port); port = AddPort("Velathri Port", "port_velathri"); Ports.Add(port.TagName, port); port = AddPort("Ariminum Port", "port_ariminum"); Ports.Add(port.TagName, port); }
public SeedIndustryData() { Industrys = new StaticDictionary <StaticIndustry>(); StaticIndustry industry; industry = AddIndustry("Roma Industry", "industry_roma"); Industrys.Add(industry.TagName, industry); industry = AddIndustry("Velathri Industry", "industry_velathri"); Industrys.Add(industry.TagName, industry); industry = AddIndustry("Ariminum Industry", "industry_ariminum"); Industrys.Add(industry.TagName, industry); }
/// <summary> /// Builds the data. /// </summary> /// <param name="interpreter"></param> /// <param name="embeddedString"></param> /// <returns></returns> public override IRoutingAlgorithmData <CHEdgeData> BuildData(IOsmRoutingInterpreter interpreter, string embeddedString) { string key = string.Format("CHEdgeDifference.Routing.IRoutingAlgorithmData<CHEdgeData>.OSM.{0}", embeddedString); var data = StaticDictionary.Get <IRoutingAlgorithmData <CHEdgeData> >( key); if (data == null) { var tagsIndex = new TagsIndex(); // do the data processing. var memoryData = new RouterDataSource <CHEdgeData>(new DirectedGraph <CHEdgeData>(), tagsIndex); var targetData = new CHEdgeGraphOsmStreamTarget( memoryData, interpreter, tagsIndex, Vehicle.Car); var dataProcessorSource = new XmlOsmStreamSource( Assembly.GetExecutingAssembly().GetManifestResourceStream(embeddedString)); var sorter = new OsmStreamFilterSort(); sorter.RegisterSource(dataProcessorSource); targetData.RegisterSource(sorter); targetData.Pull(); data = memoryData; StaticDictionary.Add <IRoutingAlgorithmData <CHEdgeData> >(key, data); } return(data); }
/// <summary> /// Builds data source. /// </summary> /// <param name="interpreter"></param> /// <param name="embeddedString"></param> /// <returns></returns> public override IBasicRouterDataSource <LiveEdge> BuildData(IOsmRoutingInterpreter interpreter, string embeddedString) { string key = string.Format("Dykstra.Routing.IBasicRouterDataSource<SimpleWeighedEdge>.OSM.{0}", embeddedString); var data = StaticDictionary.Get <IBasicRouterDataSource <LiveEdge> >( key); if (data == null) { var tagsIndex = new TagsTableCollectionIndex(); // do the data processing. var memoryData = new DynamicGraphRouterDataSource <LiveEdge>(tagsIndex); var targetData = new LiveGraphOsmStreamTarget(memoryData, interpreter, tagsIndex); var dataProcessorSource = new XmlOsmStreamSource( Assembly.GetExecutingAssembly().GetManifestResourceStream(embeddedString)); var sorter = new OsmStreamFilterSort(); sorter.RegisterSource(dataProcessorSource); targetData.RegisterSource(sorter); targetData.Pull(); data = memoryData; StaticDictionary.Add <IBasicRouterDataSource <LiveEdge> >(key, data); } return(data); }
/// <summary> /// Builds the data. /// </summary> /// <param name="interpreter"></param> /// <param name="embeddedString"></param> /// <returns></returns> public override IBasicRouterDataSource <CHEdgeData> BuildData(IOsmRoutingInterpreter interpreter, string embeddedString) { string key = string.Format("CHEdgeDifference.Routing.IBasicRouterDataSource<CHEdgeData>.OSM.{0}", embeddedString); var data = StaticDictionary.Get <IBasicRouterDataSource <CHEdgeData> >( key); if (data == null) { var tagsIndex = new TagsTableCollectionIndex(); // do the data processing. var memoryData = new DynamicGraphRouterDataSource <CHEdgeData>(tagsIndex); var targetData = new CHEdgeGraphOsmStreamTarget( memoryData, interpreter, tagsIndex, Vehicle.Car); var dataProcessorSource = new XmlOsmStreamSource( Assembly.GetExecutingAssembly().GetManifestResourceStream(embeddedString)); var sorter = new OsmStreamFilterSort(); sorter.RegisterSource(dataProcessorSource); targetData.RegisterSource(sorter); targetData.Pull(); // do the pre-processing part. var witnessCalculator = new DykstraWitnessCalculator(); var preProcessor = new CHPreProcessor(memoryData, new EdgeDifference(memoryData, witnessCalculator), witnessCalculator); preProcessor.Start(); data = memoryData; StaticDictionary.Add <IBasicRouterDataSource <CHEdgeData> >(key, data); } return(data); }
public SeedCityData() { Citys = new StaticDictionary<StaticCity>(); StaticCity city; city = AddCity("Roma City", "city_roma"); city = AddBuildingsToCity(city, "building_woodenpalisade"); Citys.Add(city.TagName, city); city = AddCity("Velathri City", "city_velathri"); Citys.Add(city.TagName, city); city = AddCity("Ariminum City", "city_ariminum"); Citys.Add(city.TagName, city); }
public SeedCityData() { Citys = new StaticDictionary <StaticCity>(); StaticCity city; city = AddCity("Roma City", "city_roma"); city = AddBuildingsToCity(city, "building_woodenpalisade"); Citys.Add(city.TagName, city); city = AddCity("Velathri City", "city_velathri"); Citys.Add(city.TagName, city); city = AddCity("Ariminum City", "city_ariminum"); Citys.Add(city.TagName, city); }
public SeedInfrastructureData() { Infrastructures = new StaticDictionary <StaticInfrastructure>(); StaticInfrastructure industry; industry = AddInfrastructure("Infra Roma", "infrastructure_roma"); industry = AddInfrastructureBuildings(industry, "building_path", "building_road"); Infrastructures.Add(industry.TagName, industry); industry = AddInfrastructure("Infra Velathri", "infrastructure_velathri"); industry = AddInfrastructureBuildings(industry, "building_path"); Infrastructures.Add(industry.TagName, industry); industry = AddInfrastructure("Infra Ariminum", "infrastructure_ariminum"); industry = AddInfrastructureBuildings(industry, "building_path", "building_road"); Infrastructures.Add(industry.TagName, industry); }
public SeedRegionData() { Regions = new StaticDictionary<StaticRegion>(); StaticRegion region; region = AddRegion("Roma Region", "region_roma", true, "country_rome"); region = AddRegionLocations(region, "city_roma", "farm_roma", "port_roma", "industry_roma", "infrastructure_roma", "province_italia"); Regions.Add(region.TagName, region); region = AddRegion("Velathri Region", "region_velathri", true, "country_rome"); region = AddRegionLocations(region, "city_velathri", "farm_velathri", "port_velathri", "industry_velathri", "infrastructure_velathri", "province_italia"); Regions.Add(region.TagName, region); region = AddRegion("Ariminum Region", "region_ariminum", true, "country_rome"); region = AddRegionLocations(region, "city_ariminum", "farm_ariminum", "port_ariminum", "industry_ariminum", "infrastructure_ariminum", "province_italia"); Regions.Add(region.TagName, region); }
public SeedRegionData() { Regions = new StaticDictionary <StaticRegion>(); StaticRegion region; region = AddRegion("Roma Region", "region_roma", true, "country_rome"); region = AddRegionLocations(region, "city_roma", "farm_roma", "port_roma", "industry_roma", "infrastructure_roma", "province_italia"); Regions.Add(region.TagName, region); region = AddRegion("Velathri Region", "region_velathri", true, "country_rome"); region = AddRegionLocations(region, "city_velathri", "farm_velathri", "port_velathri", "industry_velathri", "infrastructure_velathri", "province_italia"); Regions.Add(region.TagName, region); region = AddRegion("Ariminum Region", "region_ariminum", true, "country_rome"); region = AddRegionLocations(region, "city_ariminum", "farm_ariminum", "port_ariminum", "industry_ariminum", "infrastructure_ariminum", "province_italia"); Regions.Add(region.TagName, region); }
public SeedProvinceData() { Provinces = new StaticDictionary <StaticProvince>(); StaticProvince province; province = AddProvince("Italia", "province_italia"); Provinces.Add(province.TagName, province); }
public SeedInfrastructureData() { Infrastructures = new StaticDictionary<StaticInfrastructure>(); StaticInfrastructure industry; industry = AddInfrastructure("Infra Roma", "infrastructure_roma"); industry = AddInfrastructureBuildings(industry, "building_path", "building_road"); Infrastructures.Add(industry.TagName, industry); industry = AddInfrastructure("Infra Velathri", "infrastructure_velathri"); industry = AddInfrastructureBuildings(industry, "building_path"); Infrastructures.Add(industry.TagName, industry); industry = AddInfrastructure("Infra Ariminum", "infrastructure_ariminum"); industry = AddInfrastructureBuildings(industry, "building_path", "building_road"); Infrastructures.Add(industry.TagName, industry); }
public SeedProvinceData() { Provinces = new StaticDictionary<StaticProvince>(); StaticProvince province; province = AddProvince("Italia", "province_italia"); Provinces.Add(province.TagName, province); }
public SeedCountryData() { Countries = new StaticDictionary<StaticCountry>(); StaticCountry country; country = AddCountry("Rome", "country_rome"); country = AddCountryProvinces(country, "province_italia"); Countries.Add(country.TagName, country); }
public SeedCountryData() { Countries = new StaticDictionary <StaticCountry>(); StaticCountry country; country = AddCountry("Rome", "country_rome"); country = AddCountryProvinces(country, "province_italia"); Countries.Add(country.TagName, country); }
private void SeedDefensiveData() { StaticBuilding building; building = AddBuilding("Wooden Palisade", "building_woodenpalisade", StaticBuildingType.Defensive, RequiredEnum.City, 100, 10, 2); building = AddBuildingPrerequisites(building, "", "building_woodenwalls", "buildingchain_wall"); Buildings.Add(building.TagName, building); building = AddBuilding("Wooden Walls", "building_woodenwalls", StaticBuildingType.Defensive, RequiredEnum.City, 200, 20, 2); building = AddBuildingPrerequisites(building, "building_woodenpalisade", "building_stonewalls", "buildingchain_wall"); Buildings.Add(building.TagName, building); building = AddBuilding("Stone Walls", "building_stonewalls", StaticBuildingType.Defensive, RequiredEnum.City, 400, 40, 2); building = AddBuildingPrerequisites(building, "building_woodenwalls", "building_largestonewalls", "buildingchain_wall"); Buildings.Add(building.TagName, building); building = AddBuilding("Large Stone Walls", "building_largestonewalls", StaticBuildingType.Defensive, RequiredEnum.City, 800, 80, 2); building = AddBuildingPrerequisites(building, "building_stonewalls", "building_hugestonewalls", "buildingchain_wall"); Buildings.Add(building.TagName, building); building = AddBuilding("Huge Stone Walls", "building_hugestonewalls", StaticBuildingType.Defensive, RequiredEnum.City, 1500, 150, 2); building = AddBuildingPrerequisites(building, "building_largestonewalls", "", "buildingchain_wall"); Buildings.Add(building.TagName, building); }