Exemple #1
0
		/*
		'*********************************************************************************
		' Create NASolver and NAContext
		'*********************************************************************************
		*/
		public INAContext CreateSolverContext(INetworkDataset pNetDataset)
		{


			IDENetworkDataset pDENDS;
			
			pDENDS=GetDENetworkDataset(pNetDataset);


			INASolver pNASolver;
			INAContextEdit pContextEdit;

			//NAClosestFacilitySolver is a network analyst solver to find a set of closest facilities from a set of incidents

			pNASolver=new NAClosestFacilitySolver();
			
			pContextEdit=pNASolver.CreateContext(pDENDS,pNASolver.Name) as INAContextEdit;
			
			pContextEdit.Bind(pNetDataset,new GPMessagesClass());



			return pContextEdit as INAContext;




		
		}//end of the function CreateSolverContext
Exemple #2
0
        /// <summary>
        /// Create NASolver and NAContext
        /// </summary>
        /// <param name="networkDataset">Input network dataset</param>
        /// <returns>NAContext</returns>
        public void CreateSolverContext(INetworkDataset networkDataset)
        {
            if (networkDataset == null)
            {
                return;
            }

            //Get the Data Element
            IDENetworkDataset deNDS = GetDENetworkDataset(networkDataset);

            INASolver naSolver = new NAClosestFacilitySolver();

            m_NAContext = naSolver.CreateContext(deNDS, naSolver.Name);
            ((INAContextEdit)m_NAContext).Bind(networkDataset, new GPMessagesClass());
        }
        /*
        '*********************************************************************************
        ' Create NASolver and NAContext
        '*********************************************************************************
        */
        public INAContext CreateSolverContext(INetworkDataset pNetDataset)
        {
            IDENetworkDataset pDENDS;

            pDENDS=GetDENetworkDataset(pNetDataset);

            INASolver pNASolver;
            INAContextEdit pContextEdit;

            //NAClosestFacilitySolver is a network analyst solver to find a set of closest facilities from a set of incidents

            pNASolver=new NAClosestFacilitySolver();

            pContextEdit=pNASolver.CreateContext(pDENDS,pNASolver.Name) as INAContextEdit;

            pContextEdit.Bind(pNetDataset,new GPMessagesClass());

            return pContextEdit as INAContext;
        }
        /// <summary>
        /// Create NASolver and NAContext
        /// </summary>
        /// <param name="networkDataset">Input network dataset</param>
        /// <returns>NAContext</returns>
        public void CreateSolverContext(INetworkDataset networkDataset)
        {
            if (networkDataset == null) return;

            //Get the Data Element
            IDENetworkDataset deNDS = GetDENetworkDataset(networkDataset);

            INASolver naSolver = new NAClosestFacilitySolver();
            m_NAContext = naSolver.CreateContext(deNDS, naSolver.Name);
            ((INAContextEdit)m_NAContext).Bind(networkDataset, new GPMessagesClass());
        }