protected override RepositoryCol GetRepoCol() { RepositoryCol repoCol = new RepositoryCol(); repoCol.Setup(_dispatcher.RepoFeatureClass, RepositoryCol.RescueField);; return(repoCol); }
protected virtual void DispatchResource(Earthquake quake, string incidentData, string facilityData, string outputFolder) { _dispatcher = new Dispatcher(); _dispatcher.OutputFolder = outputFolder; if (_dispatcher.Setup(quake, facilityData, incidentData)) { RefugeeSiteCol siteCol = GetSiteCol(); _dispatcher.SetReportName(siteCol); RepositoryCol repoCol = GetRepoCol(); SupplyNetwork supplyNetwork = new SupplyNetwork(); supplyNetwork.SetLocations(siteCol, repoCol, _dispatcher.RoadNetwork); supplyNetwork.Init(_dispatcher.GetRoutesClass()); foreach (var site in siteCol.Sites) { supplyNetwork.SupplyResource(site); } _dispatcher.StoreResult(supplyNetwork.Routes, repoCol, siteCol); this.DialogResult = System.Windows.Forms.DialogResult.OK; } else { this.DialogResult = System.Windows.Forms.DialogResult.Cancel; } }
protected override RepositoryCol GetRepoCol() { RepositoryCol repoCol = new RepositoryCol(); repoCol.Setup(_dispatcher.RepoFeatureClass, RepositoryCol.ElectricityRepairerField); return(repoCol); }
internal void StoreResult(List <SupplyRoute> list, RepositoryCol repoCol, RefugeeSiteCol siteCol) { this._resultRoutes.AddRange(list); this._reposRemain = repoCol; this._sitesRemain = siteCol; }
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; } }
internal void SetLocations(RefugeeSiteCol _refugeSiteCol, RepositoryCol _repositoryCol, RoadNetwork _roadNetwork) { this._refugeSiteCol = _refugeSiteCol; this._repositoryCol = _repositoryCol; this._roadNetwork = _roadNetwork; }