You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generates the output design-of-experiment matrix by calling the appropriate function from the "DOE_function.py file".
11
+
Returns the generated DataFrame (Pandas) and a filename (string) corresponding to the type of the DOE sought by the user. This filename string is used by the CSV writer function to write to the disk i.e. save the generated DataFrame in a CSV format.
12
+
"""
13
+
14
+
dict_vars=read_variables_csv(infile)
15
+
iftype(dict_vars)!=int:
16
+
factor_count=len(dict_vars)
17
+
else:
18
+
return (-1,-1)
19
+
20
+
ifdoe_choice==1:
21
+
df=build_full_fact(dict_vars)
22
+
filename='Full_factorial_design'
23
+
24
+
elifdoe_choice==2:
25
+
print("For this choice, you will be asked to enter a generator string expression. Please only use small letters e.g. 'a b c bc' for the string. Make sure to put a space in between every variable. Please note that the number of character blocks must be identical to the number of factors you have in your input file.\n")
26
+
gen_string=str(input("Please enter the generator string for the fractional factorial build: "))
27
+
print()
28
+
iflen(gen_string.split(' '))!=factor_count:
29
+
print("Length of the generator string does not match the number of factors/variables. Sorry!")
30
+
return (-1,-1)
31
+
df=build_frac_fact(dict_vars,gen_string)
32
+
filename='Fractional_factorial_design'
33
+
34
+
elifdoe_choice==3:
35
+
df=build_plackett_burman(dict_vars)
36
+
filename='Plackett_Burman_design'
37
+
38
+
elifdoe_choice==4:
39
+
num_samples=int(input("Please enter the number of samples: "))
40
+
print()
41
+
df=build_sukharev(dict_vars,num_samples)
42
+
filename='Sukharev_grid_design'
43
+
44
+
elifdoe_choice==5:
45
+
num_center=int(input("Please enter the number of center points to be repeated (if more than one): "))
46
+
print()
47
+
df=build_box_behnken(dict_vars,num_center)
48
+
filename='Box_Behnken_design'
49
+
50
+
elifdoe_choice==6:
51
+
#num_center=int(input("Please enter the number of center points to be repeated (if more than one): "))
52
+
print()
53
+
df=build_central_composite(dict_vars,face='ccf')
54
+
filename='Box_Wilson_face_centered_design'
55
+
56
+
elifdoe_choice==7:
57
+
#num_center=int(input("Please enter the number of center points to be repeated (if more than one): "))
58
+
print()
59
+
df=build_central_composite(dict_vars,face='cci')
60
+
filename='Box_Wilson_face_inscribed_design'
61
+
62
+
elifdoe_choice==8:
63
+
#num_center=int(input("Please enter the number of center points to be repeated (if more than one): "))
64
+
print()
65
+
df=build_central_composite(dict_vars,face='ccc')
66
+
filename='Box_Wilson_face_circumscribed_design'
67
+
68
+
elifdoe_choice==9:
69
+
num_samples=int(input("Please enter the number of random sample points to generate: "))
70
+
print()
71
+
df=build_lhs(dict_vars,num_samples=num_samples)
72
+
filename='Simple_Latin_Hypercube_design'
73
+
74
+
elifdoe_choice==10:
75
+
num_samples=int(input("Please enter the number of random sample points to generate: "))
0 commit comments