Example #1
0
        /// <summary>
        /// Creates a <see cref="ContinuousResult"/>.
        /// </summary>
        /// <param name="originalRunResult">Results of the target algorithm run as reported by its output.</param>
        /// <returns>The created result.</returns>
        protected override ContinuousResult CreateRunResult(OriginalRunResult originalRunResult)
        {
            if (originalRunResult.Status == RunStatus.Crashed)
            {
                throw new ArgumentOutOfRangeException(
                          nameof(originalRunResult),
                          "Target algorithm quality run has CRASHED.");
            }

            return(new ContinuousResult(originalRunResult.Quality, originalRunResult.Runtime));
        }
Example #2
0
        /// <summary>
        /// Creates a <see cref="RuntimeResult"/>.
        /// </summary>
        /// <param name="originalRunResult">Results of the target algorithm run as reported by its output.</param>
        /// <returns>The created result.</returns>
        protected override RuntimeResult CreateRunResult(OriginalRunResult originalRunResult)
        {
            // EPMs might report SAT instead of TIMEOUT if the runtime is exactly the cutoff.
            // The specified timeout handling actually mirrors the one of SMAC 2.08 (without SMAC's own cutoff).
            if (originalRunResult.Status == RunStatus.Timeout ||
                originalRunResult.Status == RunStatus.Crashed ||
                originalRunResult.Runtime >= this.Scenario.CutoffTime)
            {
                return(ResultBase <RuntimeResult> .CreateCancelledResult(this.Scenario.CutoffTime));
            }

            return(new RuntimeResult(originalRunResult.Runtime));
        }
Example #3
0
 /// <summary>
 /// Creates a <typeparamref name="TResult"/>.
 /// </summary>
 /// <param name="originalRunResult">Results of the target algorithm run as reported by its output.</param>
 /// <returns>The created result.</returns>
 protected abstract TResult CreateRunResult(OriginalRunResult originalRunResult);