protected override RepositoryCol GetRepoCol() { RepositoryCol repoCol = new RepositoryCol(); repoCol.Setup(_dispatcher.RepoFeatureClass, RepositoryCol.ElectricityRepairerField); return(repoCol); }
protected override RepositoryCol GetRepoCol() { RepositoryCol repoCol = new RepositoryCol(); repoCol.Setup(_dispatcher.RepoFeatureClass, RepositoryCol.RescueField);; return(repoCol); }
protected override void DispatchResource(Earthquake quake, string incidentData, string facilityData, string outputFolder) { _dispatcher = new Dispatcher(); _dispatcher.OutputFolder = outputFolder; if (_dispatcher.Setup(quake, facilityData, incidentData)) { _dispatcher.SetReportName("燃气抢修组"); //RefugeeSiteCol siteCol = GetSiteCol(); //RepositoryCol repoCol = GetRepoCol(); SupplyNetwork supplyNetwork = new SupplyNetwork(); supplyNetwork.Init(_dispatcher.GetRoutesClass()); //车 RepositoryCol repoCol = new RepositoryCol(); repoCol.Setup(_dispatcher.RepoFeatureClass, RepositoryCol.GasCarField); RefugeeSiteGasCarCol siteCol = new RefugeeSiteGasCarCol(); siteCol.Setup(_dispatcher); supplyNetwork.SetLocations(siteCol, repoCol, _dispatcher.RoadNetwork); foreach (var site in siteCol.Sites) { supplyNetwork.SupplyResource(site); } //人 repoCol = new RepositoryCol(); repoCol.Setup(_dispatcher.RepoFeatureClass, RepositoryCol.GasManField); RefugeeSiteGasManCol siteManCol = new RefugeeSiteGasManCol(); siteManCol.Setup(_dispatcher); supplyNetwork.SetLocations(siteManCol, repoCol, _dispatcher.RoadNetwork); try { foreach (var site in siteCol.Sites) { supplyNetwork.SupplyResource(site); } } catch (Exception ex) { } _dispatcher.StoreResult(supplyNetwork.Routes, repoCol, siteCol); this.DialogResult = System.Windows.Forms.DialogResult.OK; } else { this.DialogResult = System.Windows.Forms.DialogResult.Cancel; } }