Exemplo n.º 1
0
        internal void StoreResult(List <SupplyRoute> list, RepositoryCol repoCol, RefugeeSiteCol siteCol)
        {
            this._resultRoutes.AddRange(list);

            this._reposRemain = repoCol;
            this._sitesRemain = siteCol;
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
 internal void SetReportName(RefugeeSiteCol siteCol)
 {
     if (siteCol != null && siteCol.Sites != null && siteCol.Sites.Count > 0)
     {
         _reportName = siteCol.Sites[0].ResourceName();
     }
 }
 internal void SetLocations(RefugeeSiteCol _refugeSiteCol, RepositoryCol _repositoryCol, RoadNetwork _roadNetwork)
 {
     this._refugeSiteCol = _refugeSiteCol;
     this._repositoryCol = _repositoryCol;
     this._roadNetwork   = _roadNetwork;
 }