Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/29/19 15:57:35 (5 years ago)
Author:
mkommend
Message:

#2521: Merged trunk changes into problem refactoring branch.

Location:
branches/2521_ProblemRefactoring
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring

  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis

  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/AircraftLift.cs

    r16565 r17226  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
    2829  public class AircraftLift : ArtificialRegressionDataDescriptor {
    29     public override string Name { get { return "Aircraft Lift Coefficient C_L = C_La (a - a0) + C_Ld_e d_e S_HT / S_ref"; } }
     30    public override string Name { get { return "Aircraft Lift Coefficient C_L = C_Lα (α - α0) + C_Lδ_e δ_e S_HT / S_ref"; } }
    3031
    3132    public override string Description {
     
    3536          "modeling generalized separable systems\", Expert Systems with Applications, Volume 109, 2018, " +
    3637          "Pages 25-34 https://doi.org/10.1016/j.eswa.2018.05.021. " + Environment.NewLine +
    37           "Function: C_L = C_La (a - a0) + C_Ld_e d_e S_HT / S_ref" + Environment.NewLine +
    38           "with C_La ∈ [0.4, 0.8]," + Environment.NewLine +
    39           "a ∈ [5°, 10°]," + Environment.NewLine +
    40           "C_Ld_e ∈ [0.4, 0.8]," + Environment.NewLine +
    41           "d_e ∈ [5°, 10°]," + Environment.NewLine +
     38          "Function: C_L = C_Lα (α - α0) + C_Lδ_e δ_e S_HT / S_ref" + Environment.NewLine +
     39          "the lift coefficient of the main airfoil C_Lα ∈ [0.4, 0.8]," + Environment.NewLine +
     40          "tha angle of attack α ∈ [5°, 10°]," + Environment.NewLine +
     41          "the lift coefficient of the horizontal tail C_Lδ_e ∈ [0.4, 0.8]," + Environment.NewLine +
     42          "δ_e ∈ [5°, 10°]," + Environment.NewLine +
    4243          "S_HT ∈ [1m², 1.5m²]," + Environment.NewLine +
    4344          "S_ref ∈ [5m², 7m²]," + Environment.NewLine +
    44           "a0 is set to -2°";
     45          "the zero-lift angle of attack α0 is set to -2°";
    4546      }
    4647    }
    4748
    4849    protected override string TargetVariable { get { return "C_L"; } }
    49     protected override string[] VariableNames { get { return new string[] { "C_La", "a", "a0", "C_Ld_e", "d_e", "S_HT", "C_L" }; } }
    50     protected override string[] AllowedInputVariables { get { return new string[] { "C_La", "a", "a0", "C_Ld_e", "d_e", "S_HT" }; } }
     50    protected override string[] VariableNames { get { return new string[] { "C_Lα", "α", "C_Lδ_e", "δ_e", "S_HT", "S_ref", "C_L", "C_L_noise" }; } }
     51    protected override string[] AllowedInputVariables { get { return new string[] { "C_Lα", "α", "C_Lδ_e", "δ_e", "S_HT", "S_ref" }; } }
    5152    protected override int TrainingPartitionStart { get { return 0; } }
    5253    protected override int TrainingPartitionEnd { get { return 100; } }
     
    7374      var S_ref = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5.0, 7.0).ToList();
    7475
    75       List<double> C_L = new List<double>();
     76      var C_L = new List<double>();
     77      var C_L_noise = new List<double>();
    7678      data.Add(C_La);
    7779      data.Add(a);
     
    8183      data.Add(S_ref);
    8284      data.Add(C_L);
     85      data.Add(C_L_noise);
    8386
    8487      double a0 = -2.0;
     
    8992      }
    9093
     94
     95      var sigma_noise = 0.05 * C_L.StandardDeviationPop();
     96      C_L_noise.AddRange(C_L.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
     97
    9198      return data;
    9299    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/AircraftMaximumLift.cs

    r16565 r17226  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Random;
    2627
     
    5455
    5556    protected override string TargetVariable { get { return "f(X)"; } }
    56     protected override string[] VariableNames { get { return new string[] { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "f(X)" }; } }
    57     protected override string[] AllowedInputVariables { get { return VariableNames.Except(new string[] { TargetVariable }).ToArray(); } }
     57    protected override string[] VariableNames { get { return new string[] { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "f(X)", "f(X)_noise" }; } }
     58    protected override string[] AllowedInputVariables { get { return VariableNames.Except(new string[] { "f(X)", "f(X)_noise" }).ToArray(); } }
    5859    protected override int TrainingPartitionStart { get { return 0; } }
    5960    protected override int TrainingPartitionEnd { get { return 100; } }
     
    106107
    107108      List<double> fx = new List<double>();
     109      List<double> fx_noise = new List<double>();
    108110      data.Add(x1);
    109111      data.Add(x2);
     
    125127      data.Add(x18);
    126128      data.Add(fx);
     129      data.Add(fx_noise);
    127130
    128131      for (int i = 0; i < x1.Count; i++) {
     
    139142      }
    140143
     144      var sigma_noise = 0.05 * fx.StandardDeviationPop();
     145      fx_noise.AddRange(fx.Select(fxi => fxi + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
     146
    141147      return data;
    142148    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/FluidDynamics.cs

    r16565 r17226  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
    2829  public class FluidDynamics : ArtificialRegressionDataDescriptor {
    29     public override string Name { get { return "Flow Psi = V_inf r sin(th) (1 - R²/r²) + G/(2 π) ln(r/R)"; } }
     30    public override string Name { get { return "Spinning cylinder flow Ψ = V_∞ r sin(θ) (1 - R²/r²) + Γ/(2 π) ln(r/R)"; } }
    3031
    3132    public override string Description {
     
    3536          "modeling generalized separable systems\", Expert Systems with Applications, Volume 109, 2018, " +
    3637          "Pages 25-34 https://doi.org/10.1016/j.eswa.2018.05.021. " + Environment.NewLine +
    37           "Function: Psi = V_inf r sin(th) (1 - R²/r²) + G/(2 π) ln(r/R)" + Environment.NewLine +
    38           "with V_inf ∈ [60 m/s, 65 m/s]," + Environment.NewLine +
    39           "th ∈ [30°, 40°]," + Environment.NewLine +
    40           "r ∈ [0.2m, 0.5m]," + Environment.NewLine +
    41           "R ∈ [0.5m, 0.8m]," + Environment.NewLine +
    42           "G ∈ [5 m²/s, 10 m²/s]";
     38          "Function: Ψ = V_∞ r sin(θ) (1 - R²/r²) + Γ/(2 π) ln(r/R)" + Environment.NewLine +
     39          "with uniform stream velocity V_∞ ∈ [60 m/s, 65 m/s]," + Environment.NewLine +
     40          "angle for polar coordinate vector field θ ∈ [30°, 40°]," + Environment.NewLine +
     41          "radius for polar coordinate vector field r ∈ [0.5m, 0.8m]," + Environment.NewLine +
     42          "radius of cylinder R ∈ [0.2m, 0.5m]," + Environment.NewLine +
     43          "vortex strength (induced by spinning) Γ ∈ [5 m²/s, 10 m²/s]" + Environment.NewLine +
     44          "Note: the definition deviates from the definition used in the source above because here we have r > R meaning we want to calculate the flow _outside_ of the cylinder.";
    4345      }
    4446    }
    4547
    46     protected override string TargetVariable { get { return "Psi"; } }
    47     protected override string[] VariableNames { get { return new string[] { "V_inf", "th", "r", "R", "G", "Psi" }; } }
    48     protected override string[] AllowedInputVariables { get { return new string[] { "V_inf", "th", "r", "R", "G" }; } }
     48    protected override string TargetVariable { get { return "Ψ"; } }
     49    protected override string[] VariableNames { get { return new string[] { "V_∞", "θ", "r", "R", "Γ", "Ψ", "Ψ_noise" }; } }
     50    protected override string[] AllowedInputVariables { get { return new string[] { "V_∞", "θ", "r", "R", "Γ" }; } }
    4951    protected override int TrainingPartitionStart { get { return 0; } }
    5052    protected override int TrainingPartitionEnd { get { return 100; } }
     
    6668      var V_inf = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 60.0, 65.0).ToList();
    6769      var th = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 30.0, 40.0).ToList();
    68       var r = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.2, 0.5).ToList();
    69       var R = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 0.8).ToList();
     70      var r = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 0.8).ToList();
     71      var R = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.2, 0.5).ToList();
    7072      var G = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5, 10).ToList();
    7173
    72       List<double> Psi = new List<double>();
     74      var Psi = new List<double>();
     75      var Psi_noise = new List<double>();
     76
    7377      data.Add(V_inf);
    7478      data.Add(th);
     
    7781      data.Add(G);
    7882      data.Add(Psi);
     83      data.Add(Psi_noise);
    7984
    8085      for (int i = 0; i < V_inf.Count; i++) {
     
    8590      }
    8691
     92      var sigma_noise = 0.05 * Psi.StandardDeviationPop();
     93      Psi_noise.AddRange(Psi.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
     94
    8795      return data;
    8896    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/PhysicsInstanceProvider.cs

    r16565 r17226  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/RocketFuelFlow.cs

    r16565 r17226  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    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.