Changeset 16428 for branches/2845_EnhancedProgress/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/FluidDynamics.cs
- Timestamp:
- 12/21/18 10:31:49 (5 years ago)
- Location:
- branches/2845_EnhancedProgress
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2845_EnhancedProgress
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/FluidDynamics.cs
r16264 r16428 27 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { 28 28 class FluidDynamics : ArtificialRegressionDataDescriptor { 29 public override string Name { get { return "Flow psi = x1*x2*x5*(1 - x4²/x5²) + 1/(2*Pi) * x3*log(x5/x4)"; } }29 public override string Name { get { return "Flow Psi = V_inf r sin(th) (1 - R²/r²) + G/(2 π) ln(r/R)"; } } 30 30 31 31 public override string Description { 32 32 get { 33 return "A full description of this problem instance is given in the paper: A multilevel block building algorithm for fast modeling generalized separable systems. " + Environment.NewLine + 34 "Authors: Chen Chen, Changtong Luo, Zonglin Jiang" + Environment.NewLine + 35 "Function: f(X) = x1*x2*x5*(1 - x4²/x5²) + 1/(2*Pi) * x3*log(x5/x4)" + Environment.NewLine + 36 "with x1 in [60,65], x2 in [30, 40], x3 in [5,10], x4 in [0.5,0.8], x5 in [0.2,0.5]"; 33 return "A full description of this problem instance is given in: " + Environment.NewLine + 34 "Chen Chen, Changtong Luo, Zonglin Jiang, \"A multilevel block building algorithm for fast " + 35 "modeling generalized separable systems\", Expert Systems with Applications, Volume 109, 2018, " + 36 "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]"; 37 43 } 38 44 } 39 45 40 protected override string TargetVariable { get { return " f(X)"; } }41 protected override string[] VariableNames { get { return new string[] { " x1", "x2", "x3", "x4", "x5", "f(X)" }; } }42 protected override string[] AllowedInputVariables { get { return new string[] { " x1", "x2", "x3", "x4", "x5" }; } }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" }; } } 43 49 protected override int TrainingPartitionStart { get { return 0; } } 44 50 protected override int TrainingPartitionEnd { get { return 100; } } … … 58 64 59 65 List<List<double>> data = new List<List<double>>(); 60 var x1= ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 60.0, 65.0).ToList();61 var x2= ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 30.0, 40.0).ToList();62 var x3 = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5.0, 10.0).ToList();63 var x4= ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 0.8).ToList();64 var x5 = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.2, 0.5).ToList();66 var V_inf = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 60.0, 65.0).ToList(); 67 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 G = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5, 10).ToList(); 65 71 66 List<double> fx= new List<double>();67 data.Add( x1);68 data.Add( x2);69 data.Add( x3);70 data.Add( x4);71 data.Add( x5);72 data.Add( fx);72 List<double> Psi = new List<double>(); 73 data.Add(V_inf); 74 data.Add(th); 75 data.Add(r); 76 data.Add(R); 77 data.Add(G); 78 data.Add(Psi); 73 79 74 for (int i = 0; i < x1.Count; i++) { 75 double fxi = x1[i] * x2[i] * x5[i] * (1 - (x4[i] * x4[i]) / (x5[i] * x5[i])) + 76 (1 / (2 * Math.PI)) * x3[i] * Math.Log(x5[i] / x4[i]); 77 fx.Add(fxi); 80 for (int i = 0; i < V_inf.Count; i++) { 81 var th_rad = Math.PI * th[i] / 180.0; 82 double Psi_i = V_inf[i] * r[i] * Math.Sin(th_rad) * (1 - (R[i] * R[i]) / (r[i] * r[i])) + 83 (G[i] / (2 * Math.PI)) * Math.Log(r[i] / R[i]); 84 Psi.Add(Psi_i); 78 85 } 79 86
Note: See TracChangeset
for help on using the changeset viewer.