/// <summary>Initializes a new instance of the
 /// <see cref="TestableRareEventProbabilityEstimationContext"/>
 /// class.</summary>
 /// <param name="context">The context to test.</param>
 /// <param name="stateDimension">The expected state dimension.</param>
 /// <param name="eliteSampleDefinition">The expected elite sample definition.</param>
 /// <param name="traceExecution">The expected value about tracing context execution.</param>
 /// <param name="thresholdLevel">The expected elite threshold level.</param>
 /// <param name="rareEventPerformanceBoundedness">The expected rare event performance boundedness.</param>
 /// <param name="initialParameter">The expected nominal parameter.</param>
 /// <param name="rareEventProbability">The expected rare event probability.</param>
 public TestableRareEventProbabilityEstimationContext(
     RareEventProbabilityEstimationContext context,
     int stateDimension,
     EliteSampleDefinition eliteSampleDefinition,
     bool traceExecution,
     double thresholdLevel,
     RareEventPerformanceBoundedness rareEventPerformanceBoundedness,
     DoubleMatrix initialParameter,
     double rareEventProbability
     ) : base(
         context,
         stateDimension,
         eliteSampleDefinition,
         traceExecution)
 {
     this.ThresholdLevel = thresholdLevel;
     this.RareEventPerformanceBoundedness = rareEventPerformanceBoundedness;
     this.NominalParameter     = initialParameter;
     this.RareEventProbability = rareEventProbability;
 }
 public RareEventProbabilityEstimationContext01(
     int stateDimension,
     double thresholdLevel,
     RareEventPerformanceBoundedness rareEventPerformanceBoundedness,
     DoubleMatrix initialParameter)
     : base(
         // The target probability is Pr{ x <= -4 } for
         // real x, hence the dimension is 1.
         stateDimension: stateDimension,
         // Set the threshold level and the rare event
         // boundedness in order to target the probability
         // of the event { x <= -4 }.
         thresholdLevel: thresholdLevel,
         rareEventPerformanceBoundedness:
         rareEventPerformanceBoundedness,
         // Define the nominal parameter of interest.
         // (Gaussian Standard distribution).
         initialParameter: initialParameter
         )
 {
 }
Example #3
0
 public RareEventProbabilityEstimationContext00(
     int stateDimension,
     double thresholdLevel,
     RareEventPerformanceBoundedness rareEventPerformanceBoundedness,
     DoubleMatrix initialParameter)
     : base(
         // There are 5 edges in the network under study.
         // Hence we need a vector of length 5 to represent
         // the state of the system, i.e. the observed lengths 
         // corresponding to such edges.
         stateDimension: stateDimension,
         // Set the threshold level and the rare event 
         // boundedness in order to target the probability 
         // of the event {2.0 <= Performance(x)}.
         thresholdLevel: thresholdLevel,
         rareEventPerformanceBoundedness:
             rareEventPerformanceBoundedness,
         // Define the nominal parameter of interest.
         initialParameter: initialParameter
           )
 {
 }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="RareEventProbabilityEstimationContext" /> class
        /// having the specified state dimension, threshold level,
        /// and boundedness.
        /// </summary>
        /// <param name="thresholdLevel">
        /// The performance level under or over which a state
        /// is considered as included in the rare event under study.
        /// </param>
        /// <param name="stateDimension">
        /// The dimension of a vector representing the state
        /// of the system in which the rare event can happen.
        /// </param>
        /// <param name="rareEventPerformanceBoundedness">
        /// A constant to specify if the rare event is a set
        /// of states whose
        /// performances are lower or upper bounded
        /// by the <paramref name="thresholdLevel"/>.
        /// </param>
        /// <param name="initialParameter">
        /// The nominal parameter under which
        /// the event probability must be evaluated.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="initialParameter"/> is <b>null</b>.
        /// </exception>
        /// <exception cref="ArgumentException">
        /// <paramref name="rareEventPerformanceBoundedness"/> is not a field of
        /// <see cref="Advanced.RareEventPerformanceBoundedness"/>.
        /// </exception>
        protected RareEventProbabilityEstimationContext(
            int stateDimension,
            DoubleMatrix initialParameter,
            double thresholdLevel,
            RareEventPerformanceBoundedness rareEventPerformanceBoundedness
            )
            : base(stateDimension, initialParameter)
        {
            if ((rareEventPerformanceBoundedness != RareEventPerformanceBoundedness.Upper)
                &&
                (rareEventPerformanceBoundedness != RareEventPerformanceBoundedness.Lower)
                )
            {
                throw new ArgumentException(
                          ImplementationServices.GetResourceString(
                              "STR_EXCEPT_NOT_FIELD_OF_RARE_EVENT_PERFORMANCE_BOUNDEDNESS"),
                          nameof(rareEventPerformanceBoundedness));
            }

            this.RareEventPerformanceBoundedness = rareEventPerformanceBoundedness;
            this.ThresholdLevel = thresholdLevel;
        }