Ignore:
Timestamp:
07/26/19 12:38:13 (7 weeks ago)
Author:
mkommend
Message:

#3014: Merged r17092, r17093, r17094, r17150 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.Instances.DataAnalysis

  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/RocketFuelFlow.cs

    r17097 r17174  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Random;
    2627
     
    3637          "Pages 25-34 https://doi.org/10.1016/j.eswa.2018.05.021. " + Environment.NewLine +
    3738          "Function: m_dot = p0 A / sqrt(T0) * sqrt(γ/R (2/(γ+1))^((γ+1) / (γ-1)))" + Environment.NewLine +
    38           "with p0 ∈ [4e5 Pa, 6e5 Pa]," + Environment.NewLine +
    39           "A ∈ [0.5m², 1.5m²]," + Environment.NewLine +
    40           "T0 ∈ [250°K, 260°K]," + Environment.NewLine +
    41           "γ=1.4 and R=287 J/(kg*K)" + Environment.NewLine +
    42           "The factor sqrt(γ/R (2/(γ+1))^((γ+1) / (γ-1))) is constant as γ and R are constants.";
     39          "with total pressure p0 ∈ [4e5 Pa, 6e5 Pa]," + Environment.NewLine +
     40          "cross-sectional area of the nozzle A ∈ [0.5m², 1.5m²]," + Environment.NewLine +
     41          "total temperature T0 ∈ [250°K, 260°K]," + Environment.NewLine +
     42          "specific heat capacity γ = 1.4 and gas constant R = 287 J/(kg*K)" + Environment.NewLine +
     43          "The factor sqrt(γ/R (2/(γ+1))^((γ+1) / (γ-1))) is constant because γ and R are constants.";
    4344      }
    4445    }
    4546
    4647    protected override string TargetVariable { get { return "m_dot"; } }
    47     protected override string[] VariableNames { get { return new string[] { "p0", "A", "T0", "m_dot" }; } }
     48    protected override string[] VariableNames { get { return new string[] { "p0", "A", "T0", "m_dot", "m_dot_noise" }; } }
    4849    protected override string[] AllowedInputVariables { get { return new string[] { "p0", "A", "T0" }; } }
    4950    protected override int TrainingPartitionStart { get { return 0; } }
     
    6869      var T0 = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 250.0, 260.0).ToList();
    6970
    70       List<double> m_dot = new List<double>();
     71      var m_dot = new List<double>();
     72      var m_dot_noise = new List<double>();
    7173      data.Add(p0);
    7274      data.Add(A);
    7375      data.Add(T0);
    7476      data.Add(m_dot);
     77      data.Add(m_dot_noise);
    7578      double R = 287.0;
    7679      double γ = 1.4;
     
    8184      }
    8285
     86      var sigma_noise = 0.05 * m_dot.StandardDeviationPop();
     87      m_dot_noise.AddRange(m_dot.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
    8388      return data;
    8489    }
Note: See TracChangeset for help on using the changeset viewer.