Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3136_Structural_GP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Asadzadeh/Asadzadeh1.cs @ 18084

Last change on this file since 18084 was 18084, checked in by dpiringe, 2 years ago

#3136

  • added a new problem data provider AsadzadehProvider and the correspondig instance Asadzadeh1
    • implements the test setup of paper Symbolic regression based hybrid semiparametric modelling of processes: An example case of a bending process
  • used the Asadzadeh1 instance in StructuredSymbolicRegressionSingleObjectiveProblem for default setup
  • added the SubFunctionSymbol in DerivativeCalculator and IntervalArithBoundsEstimator
File size: 2.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Random;
7
8namespace HeuristicLab.Problems.Instances.DataAnalysis {
9  public sealed class Asadzadeh1 : ArtificialRegressionDataDescriptor {
10    public override string Name => "Asadzadeh1";
11
12    public override string Description => "Asadzadeh1";
13
14    protected override string TargetVariable => "F";
15    protected override string[] VariableNames => new string[] { "h", "sigma_y", "t", "Rt", "wR", "F" };
16    protected override string[] AllowedInputVariables => new string[] { "h", "sigma_y", "t", "Rt", "wR" };
17
18    protected override int TrainingPartitionStart => 0;
19    protected override int TrainingPartitionEnd => 500;
20    protected override int TestPartitionStart => 500;
21    protected override int TestPartitionEnd => 1000;
22
23    protected override List<List<double>> GenerateValues() {
24      var rand = new MersenneTwister((uint)DateTime.Now.Ticks);
25
26      List<double> h = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.1, 5).ToList();
27      List<double> sigmaY = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 250, 1000).ToList();
28      List<double> t = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 5).ToList();
29      List<double> Rt = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 1, 100).ToList();
30      List<double> wR = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 1.5).ToList();
31      List<double> F = new List<double>();
32
33      for (int i = TrainingPartitionStart; i < TestPartitionEnd; ++i) {
34        F.Add(Calc(h[i], sigmaY[i], t[i], Rt[i], wR[i]));
35      }
36
37      return new List<List<double>> { h, sigmaY, t, Rt, wR, F };
38    }
39
40    private static double Calc(double h, double sigmaY, double t, double Rt, double wR) {
41      var E = 210000;
42      var R = Rt * t;
43      var w = wR * R;
44      var e = E / (E + h);
45      var yieldStrength = (sigmaY * (t * t)) / w;
46      var plasticHardening = (h * t * t * t) / (3 * R * w);
47      var elasticity = (4 * sigmaY * sigmaY * sigmaY * R * R) / (3 * w * E * E);
48      var C = 1 + 4 * (t / w);
49      return e * (yieldStrength + plasticHardening - elasticity) * C;
50    }
51  }
52}
Note: See TracBrowser for help on using the repository browser.