Esempio n. 1
0
        /// <summary>
        /// Create NASolver and NAContext
        /// </summary>
        /// <param name="networkDataset">Input network dataset</param>
        /// <returns>NAContext</returns>
        public INAContext CreateSolverContext(INetworkDataset networkDataset)
        {
            // Get the data element
            IDENetworkDataset deNDS       = GetDENetworkDataset(networkDataset);
            INASolver         naSolver    = new NAVRPSolver();
            INAContextEdit    contextEdit = naSolver.CreateContext(deNDS, naSolver.Name) as INAContextEdit;

            // Bind a context using the network dataset
            contextEdit.Bind(networkDataset, new GPMessagesClass());

            return(contextEdit as INAContext);
        }
		/// <summary>
		/// Create NASolver and NAContext
		/// </summary>
		/// <param name="networkDataset">Input network dataset</param>
		/// <returns>NAContext</returns>
		public INAContext CreateSolverContext(INetworkDataset networkDataset)
		{
			// Get the data element
			IDENetworkDataset deNDS = GetDENetworkDataset(networkDataset);
			INASolver naSolver = new NAVRPSolver();
			INAContextEdit contextEdit = naSolver.CreateContext(deNDS, naSolver.Name) as INAContextEdit;

			// Bind a context using the network dataset 
			contextEdit.Bind(networkDataset, new GPMessagesClass());

			return contextEdit as INAContext;
		}