/// <summary>
        /// Releases the computation resources at the end of optimization routine
        /// </summary>
        public static void Dispose()
        {
            // -1- Clean up Task Execution resources
            switch (Shared.Config.TaskExecutionMode)
            {
            case TaskExecutionMode.Azure:
                AzureBatchManager.DisposeAsync().Wait();
                break;

            case TaskExecutionMode.Linear:
            case TaskExecutionMode.Parallel:
                // -2- Release AppDomain
                AppDomainRunner.Dispose();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }