-
Notifications
You must be signed in to change notification settings - Fork 0
/
DOE_plotting.py
30 lines (24 loc) · 1009 Bytes
/
DOE_plotting.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from optimization_tools import plot_generations
from DOE_FullFactorial import DOE
import pickle
fileObject = open('DOE_FullFactorial.p','r')
original_problem = pickle.load(fileObject)
fileObject.close()
problem = DOE(levels=4, driver='Full Factorial')
# problem.load(original_problem, filetype = 'object')
problem.load('DOE_data.txt' , variables_names = ['g', 'k', 'N'],
outputs_names = ['displacement', 'nodes', 'stress'],
header = ['g', 'k', 'N', 'displacement', 'nodes', 'stress'], filetype = 'file')
problem.find_influences()
problem.something = 0
print problem.something
print problem.output_names
print problem.variables_names
print problem.influences
print problem.levels
print 'n_var: ', problem.n_var
convert_to_MPa = lambda x: x/1e6
convert_to_abs = lambda x: abs(x)
problem.plot(xlabel = ['$d_k$', '$d_g$', '$N$'],
ylabel = ['TE displacement (m)', 'N edges', 'Max stress (Mpa)'],
process = {'stress':convert_to_MPa, 'displacement':convert_to_abs})