1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using HeuristicLab.Random;
|
---|
5 |
|
---|
6 | namespace HeuristicLab.Problems.Instances.DataAnalysis {
|
---|
7 | public sealed class SheetBendingProcess : ArtificialRegressionDataDescriptor {
|
---|
8 | public override string Name => "Sheet Bending Process F = E/(E+h) * ((σ_y * t^2) / w + (h * t^3) / (3 * R * w) - (4 * σ_y^3 * R^2) / (3 * w * E^2)) * (1 + 4 * t / w)";
|
---|
9 |
|
---|
10 | public override string Description =>
|
---|
11 | "A full description of this instance is given in: " + Environment.NewLine +
|
---|
12 | "Mohammad Zhian Asadzadeh, Hans-Peter Gänser, Manfred Mücke, " + Environment.NewLine +
|
---|
13 | "\"Symbolic regression based hybrid semiparametric modelling of processes: " + Environment.NewLine +
|
---|
14 | "An example case of a bending process\"," + Environment.NewLine +
|
---|
15 | "Applications in Engineering Science, Volume 6, 2021, 100049, " + Environment.NewLine +
|
---|
16 | "ISSN 2666-4968, https://doi.org/10.1016/j.apples.2021.100049. " + Environment.NewLine +
|
---|
17 | "Function: F = E/(E+h) * ((σ_y * t^2) / w + (h * t^3) / (3 * R * w) - (4 * σ_y^3 * R^2) / (3 * w * E^2)) * (1 + 4 * t / w)" +
|
---|
18 | "with E = 210000," + Environment.NewLine +
|
---|
19 | "h ∈ [0.1, 5] [MPa]," + Environment.NewLine +
|
---|
20 | "σ_y ∈ [250, 1000] [MPa]," + Environment.NewLine +
|
---|
21 | "t ∈ [0.5, 5] [mm]," + Environment.NewLine +
|
---|
22 | "R/t ∈ [1, 100]," + Environment.NewLine +
|
---|
23 | "w/R ∈ [0.5, 1.5]";
|
---|
24 |
|
---|
25 |
|
---|
26 |
|
---|
27 | protected override string TargetVariable => "F";
|
---|
28 | protected override string[] VariableNames => new string[] { "h", "sigma_y", "t", "Rt", "wR", "F" };
|
---|
29 | protected override string[] AllowedInputVariables => new string[] { "h", "sigma_y", "t", "Rt", "wR" };
|
---|
30 |
|
---|
31 | protected override int TrainingPartitionStart => 0;
|
---|
32 | protected override int TrainingPartitionEnd => 500;
|
---|
33 | protected override int TestPartitionStart => 500;
|
---|
34 | protected override int TestPartitionEnd => 1000;
|
---|
35 |
|
---|
36 | public int Seed { get; }
|
---|
37 |
|
---|
38 | public SheetBendingProcess() : this((int)DateTime.Now.Ticks) { }
|
---|
39 |
|
---|
40 | public SheetBendingProcess(int seed) {
|
---|
41 | Seed = seed;
|
---|
42 | }
|
---|
43 |
|
---|
44 | protected override List<List<double>> GenerateValues() {
|
---|
45 | var rand = new MersenneTwister((uint)Seed);
|
---|
46 |
|
---|
47 | List<double> h = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.1, 5).ToList();
|
---|
48 | List<double> sigmaY = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 250, 1000).ToList();
|
---|
49 | List<double> t = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 5).ToList();
|
---|
50 | List<double> Rt = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 1, 100).ToList();
|
---|
51 | List<double> wR = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 1.5).ToList();
|
---|
52 | List<double> F = new List<double>();
|
---|
53 |
|
---|
54 | for (int i = TrainingPartitionStart; i < TestPartitionEnd; ++i) {
|
---|
55 | F.Add(Calc(h[i], sigmaY[i], t[i], Rt[i], wR[i]));
|
---|
56 | }
|
---|
57 |
|
---|
58 | return new List<List<double>> { h, sigmaY, t, Rt, wR, F };
|
---|
59 | }
|
---|
60 |
|
---|
61 | private static double Calc(double h, double sigmaY, double t, double Rt, double wR) {
|
---|
62 | var E = 210000;
|
---|
63 | var R = Rt * t;
|
---|
64 | var w = wR * R;
|
---|
65 | var e = E / (E + h);
|
---|
66 | var yieldStrength = (sigmaY * (t * t)) / w;
|
---|
67 | var plasticHardening = (h * t * t * t) / (3 * R * w);
|
---|
68 | var elasticity = (4 * sigmaY * sigmaY * sigmaY * R * R) / (3 * w * E * E);
|
---|
69 | var C = 1 + 4 * (t / w);
|
---|
70 | return e * (yieldStrength + plasticHardening - elasticity) * C;
|
---|
71 | }
|
---|
72 | }
|
---|
73 | }
|
---|