Tutorial 1: Sensitivity analysis of an analytical function Example: Analytical nonlinear function • Additive linear and nonlinear terms and one coupling term • Contribution to the output variance (reference values): X1: 18.0%, X2: 30.6%, X3: 64.3%, X4: 0.7%, X5: 0.2% 2 Tutorial 1: Sensitivity Analysis Task description • Parameterization of the problem • Defining DOE scheme • Evaluation of DOE designs • Statistical post-processing of DOE • Approximation post-processing of DOE • Defining MOP search algorithm • Evaluation of MOP workflow • Statistical post-processing of MOP • Approximation post-processing of MOP • Reload results in Result Monitoring • Use Matlab as solver • Use Excel as solver • Use Excel plug-in to export data in optiSLang format 3 Tutorial 1: Sensitivity Analysis Project manager 1. 2. 3. 1. 2. 3. 4. 4 Open the project manager Define project name Create a new project directory Copy optiSLang examples/Coupled_Function into project directory Tutorial 1: Sensitivity Analysis Parameterization of the problem 1. 2. 3. 4. 5. 1. Start a new parametrize workflow (double click) 2. Define workflow name 3. Create a new problem specification 4. Enter problem file name 5 Tutorial 1: Sensitivity Analysis Parameterization of the problem 1. 2. 3. 1. Click “open file” icon in parametrize editor 2. Browse for the SLang input file coupled_function.s 3. Choose file type as INPUT 6 Tutorial 1: Sensitivity Analysis Parameterization of the problem 1. 2. 1. Mark value of X1 in the input file 2. Define X1 as input parameter 3. Enter parameter name 7 Tutorial 1: Sensitivity Analysis 3. Parameterization of the problem 1. 1. Open parameter in parameter three 2. Enter lower and upper bounds 3. Set as default for other variables and repeat for X2 … X5 8 Tutorial 1: Sensitivity Analysis 2. 3. Parameterization of the problem 1. 2. 3. 1. Click “open file” icon in parametrize editor 2. Browse for the SLang output file coupled_solution.s 3. Choose file type as OUTPUT 9 Tutorial 1: Sensitivity Analysis Parameterization of the problem 4. 2. 1. 1. 2. 3. 4. 10 Mark output value in editor Define Y as output parameter Enter parameter name Close parametrize editor Tutorial 1: Sensitivity Analysis 3. Parameterization of the problem 1. 2. 3. 1. Check parameter overview for inputs 2. Check parameter overview for outputs 3. Close overview 11 Tutorial 1: Sensitivity Analysis Define Design Of Experiments (DOE) 2. 1. 3. 4. 1. 2. 3. 4. 12 Start a new DOE workflow (double click) Define workflow name Define workflow identifier (working directory) Enter problem file name Tutorial 1: Sensitivity Analysis Define Design Of Experiments (DOE) 1. 2. 3. 4. 1. 2. 3. 4. 13 Enter solver call (slang –b coupled_function.s) Enter number of parallel runs Choose if design directories should be deleted Start DOE workflow Tutorial 1: Sensitivity Analysis Generate DOE scheme 1. 2. 1. 2. 3. 4. 14 3. Choose Latin hypercube sampling Enter number of samples (50…100) Generate samples Close dialog and show samples Tutorial 1: Sensitivity Analysis 4. Generate DOE scheme 1. 1. Start evaluation of samples 15 Tutorial 1: Sensitivity Analysis Statistics post-processing 3. 1. 5. 2. 4. 1. 2. 3. 4. 5. 6. 16 6. Linear correlation matrix (In-In, In-Out, Out-In and Out-Out) Quadratic correlation matrix (total values or difference to linear) Histogram of input/output (select variable in 1.) Anthill plot (select variables in 1.) CoD/CoI values (linear: select in 1., quadratic: select in 2.) Ranked linear or quadratic correlations of single response Tutorial 1: Sensitivity Analysis Statistics post-processing 1. 1. 2. 1. Switch between CoD/CoI visualization 2. Extended correlation matrix (optiSLang 3.2) 17 Tutorial 1: Sensitivity Analysis Statistics post-processing 1. 2. 1. Statistical properties of single variable 2. Traffic light plot of response for given safety & failure limit (optiSLang 3.2) 18 Tutorial 1: Sensitivity Analysis Statistics post-processing 1. 2. 3. 1. Show development of correlation coefficients 2. Show design table 3. Export DOE to Excel 19 Tutorial 1: Sensitivity Analysis Statistics post-processing 1. 2. 1. Principal Component Analysis (PCA) of linear correlations 2. Parallel coordinates plot to show designs having an input/output within certain lower and upper bounds 20 Tutorial 1: Sensitivity Analysis Statistics post-processing 1. 2. 1. Significance filter for CoD/CoI 2. Manual filter for CoD/CoI 21 Tutorial 1: Sensitivity Analysis Approximation post-processing 3. 1. 2. 4a. 4b. 1. Anthill plot of parameter 1 and the response 2. Contour plot of approximation function in terms of parameter 1 and 2 (remaining are set to their mean) vs. the response 3. Surface plot of approximation function 4. Details about approximation settings and properties 22 Tutorial 1: Sensitivity Analysis Approximation post-processing 3. 4a. 4b. • 23 Manual approximation settings: • Parameter subspace • Polynomial or MLS (exponential or regularized) • Basis polynomial, constant or density dependent influence • Transformation settings Tutorial 1: Sensitivity Analysis Meta-Model of Optimal Prognosis (MOP) 2. 1. 3. 4. 5. 1. 2. 3. 4. 5. 24 Start a new MOP workflow (double click) Define workflow name Define workflow identifier (working directory) Choose DOE result file Choose optional problem file Tutorial 1: Sensitivity Analysis Meta-Model of Optimal Prognosis (MOP) 1. 4. 2. 3. 5. 1. 2. 3. 4. 5. 25 CoP settings (sample splitting or cross validation) Investigated approximation models DCoP - accepted reduction in prediction quality to simplify model Filter settings Selection of inputs and outputs Tutorial 1: Sensitivity Analysis Meta-Model of Optimal Prognosis (MOP) • 26 optiSLang console gives detailed information about the investigated models and obtained optimal CoP values Tutorial 1: Sensitivity Analysis Meta-Model of Optimal Prognosis (MOP) • • 27 Approximation post-processing automatically shows surface and contour plot of the two most important variables vs. the response CoP values for single variables are shown Tutorial 1: Sensitivity Analysis Overview of different significance values • MOP/CoP close to reference values (detects optimal subspace automatically, represents nonlinear and coupling terms) CoD, k=5 CoI, k=5 CoI, k=3 CoP, k=3 Reference 75% 75% 74% 97% 100% X1 2% 14% 14% 18% 18% X2 18% 30% 28% 31% 31% X3 41% 34% 39% 62% 64% X4 0% 0% - - 0.7% X5 0% 1% - - 0.2% 28 Tutorial 1: Sensitivity Analysis (all inputs) Full model (all inputs) (manual) (automatic) Reload DOE or MOP in Result Monitoring 2. 1. 3. 1. 2. 3. 4. 29 Start a new Results Monitoring workflow (double click) Define workflow name Choose DOE or MOP result file Start Post-Processing Tutorial 1: Sensitivity Analysis Tutorial 1: Use Matlab as solver Use Matlab as solver 1. 2. 3. 4. Matlab input file: coupled_function.m 1. Input parameter definition 2. Function evaluation 3. Writing the result file 4. Exit Matlab execution! 31 Tutorial 1: Sensitivity Analysis Use Matlab as solver 1. 2. 3. 4. Call Matlab from Windows: matlab_windows.bat 1. Disable splash 2. Disable desktop 3. Disable java virtual machine 4. Minimize remaining command window 5. Wait until Matlab is terminated 32 Tutorial 1: Sensitivity Analysis 5. Use Matlab as solver 1. 2. 3. 4. 5. Call Matlab from Linux: matlab_linux.sh 1. Set empty display 2. Disable splash 3. Disable desktop 4. Disable java virtual machine 5. Wait until Matlab is finished 33 Tutorial 1: Sensitivity Analysis Use Matlab as solver 1. 2. 1. Parameterize inputs in optiSLang from coupled_function.m 2. Parameterize output from coupled_solution.txt 34 Tutorial 1: Sensitivity Analysis Use Matlab as solver 1. 2. 1. Open new DOE workflow and select “Run a script file” 2. Choose the batch script and start DOE process 35 Tutorial 1: Sensitivity Analysis Tutorial 1: Use Excel as solver Use Excel as solver 2. 1. 3. 1. Generate Excel file with all inputs in one row and all outputs in one column 2. Mark first input as inputParams 3. Mark first output as outputParams 37 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. 2. 3. 1. Show Macros 2. Enter Macro name 3. Create Macro 38 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. 2. 1. In Visual Basic environment use import file feature 2. Import predefined macro file inout.bas 39 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. 1. 2. 1. inout module should be shown in the module list 2. Delete the empty default module 40 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. 2. The visual basic macro 1. Input file name 2. Output file name 41 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. Java script to run Excel in batch mode 1. Excel file name 42 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. Batch script to run Excel java script 1. Call of java script with full path, modify path if necessary! 43 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. 2. 1. Parameterize inputs in optiSLang from input.txt 2. Parameterize output from output.txt 44 Tutorial 1: Sensitivity Analysis Use Excel as solver 1. 2. 1. Open new DOE workflow and select “Run a script file” 2. Choose the batch script and start DOE process 45 Tutorial 1: Sensitivity Analysis Tutorial 1: Use Excel plug-in Use Excel plug-in 1. 2. 3b. 3a. 1. Start the plug-in in Excel 2. Mark input data including parameter names 3. Check parameter names and data array 47 Tutorial 1: Sensitivity Analysis Use Excel plug-in 2b. 1. 2a. 1. Mark output data including parameter names 2. Check parameter names and data array 48 Tutorial 1: Sensitivity Analysis Use Excel plug-in 1. 2. 1. Choose design numbers 2. Finish and save data in optiSLang *.bin file 3. Open *.bin in result monitoring workflow 49 Tutorial 1: Sensitivity Analysis