-
Notifications
You must be signed in to change notification settings - Fork 54
Testing foqus
Pedro Sotorrio edited this page Mar 26, 2018
·
10 revisions
Here is where a list of test will go.
Open Anaconda Prompt
and run the python program. This will start up FOQUS and start the select working directory dialog.
> python \ProgramData\Anaconda2\Scripts\foqus.py
> git clone https://$USERNAME:[email protected]/CCSI-Toolset/foqus
> cd foqus/examples/Optimization
- Select
foqus/examples/Optimization/BFBCostOpt.foqus
- Browse and select
foqus/examples/Optimization/Model_Files/BFB_sinter_config_v6.2.json
- Name this "BFB"
- Go to https://github.com/CSSI-Toolset/foqus/releases
- Under "Internal 2018 Feb release", click on "Source code (zip)"
- Select "Save File" and click "OK"
- After file is downloaded, "Extract All" in the directory "C:\Users\sotorrio1\foqus-1.0.0"
- Go to Windows Terminal and type the following commands:
cd foqus-1.0.0
python setup.py install
- Type the following command in the Windows Terminal (make sure you are in the foqus-1.0.0 directory):
python foqus.py
- FOQUS asks the user to provide the working directory
- Once the working directory is set up, the FOQUS main window pops up
- First thing I like to do is going to the "Settings" tab and making sure "Working Directory" and "PSUADE EXE" are set up correctly
- Click on the arrow right next to the "Session" tab and click "Open Session..."
- FOQUS asks the user "Do you want to save your current session before loading another session?"
- Since this is the first session we are loading and there is no current session, click "No" and the browsing window shows up
- Go to "C:\Users\sotorrio1\foqus-1.0.0\examples\UQ" and select the file "Rosenbrock_no_vectors.foqus"
- Go to "Uncertainty" tab
- Click "Add New..."
- In the "Add New Ensemble - Model Selection" window make sure "Use flowsheet" is selected and click "OK"
- In the "Simulation Ensemble Setup" window make sure "Choose sampling scheme" is selected
- In the "Distributions" tab change the "type" of variable "Rosenbrock.x2" to "Fixed" and a value equal to 5
- Switch to the "Sampling Scheme" tab
- Select "Latin Hypercube" as sampling scheme and 1,000 samples
- Click "Generate Samples" button. Samples are generated
- Go to "Preview Samples"
- Select all inputs and click "Graph 1-D Scatter". Scatter plots are generated
- Left click let the user zoom in on each individual scatter plot
- Right click let the user zoom out back to all the plots
- Close the figure and go back to "Preview Inputs" window
- Select two inputs and click "Graph 2-D Scatter (2 Inputs Only)". Scatter plot is generated
- Close the figure and go back to "Preview Inputs" window
- Select all inputs and click "Graph Distribution". Distribution plots are generated
- Left click let the user zoom in on each individual distribution plot
- Right click let the user zoom out back to all the plots
- Close the figure and go back to "Preview Inputs" window
- Click "OK" to close the "Preview Inputs" window and go back to "Simulation Ensemble Setup" window
- Click "Done" to close the "Simulation Ensemble Setup"
- In the "Simulation Ensemble Table" click "Launch"
- "FOQUS Run Finished" window pops up showing the amount of successful runs. Click "OK" to close it
- Click "Delete Selected" to delete the ensemble from the "Simulation Ensemble Setup"
- Click "Load from File..." button
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\UQ" and select the file "lptau20k_10inputs_4outputs.filtered"
- In the "Simulation Ensemble Table" click "Analyze"
- "Analysis of Ensemble" window opens
- Make sure you are in "Wizard" mode
- Click "Enable Parameter Screening"
- Test every combination:
- Choose an output to analyze (removalCO2, removalH2O, dPads)
- Choose a parameter selection method (MARS Ranking, Sum of Trees, Delta Test, Gaussian Process)
- Click "Compute input importance". A bar plot with parameter screening rankings is generated
- In the Analysis section, make sure "Ensemble Data" is selected as the output to use for the analysis
- Choose output variable to analyze
- Select one input and click "Visualize". 1-input to 1-output scatter plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select a second input and click "Visualize". 2-input to 1-output scatter plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Uncertainty Analysis" and click "Analyze". PDF and CDF plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Sensitivity Analysis" and "First-order", and click "Analyze". First-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Second-order", and click "Analyze". Second-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Total-order", and click "Analyze". Total-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Make sure "Response Surface" is selected as the output to use for the analysis
- Select "removalCO2" as the output to analyze
- Select "Polynomial" and "Linear Regression" for the response surface method selection
- Specify a 7.50% error envelope
- Click Validate. Model Error Histogram and Actual vs. Predicted Data plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select one input and click "Visualize". 1-input to 1-output line plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select a second input and click "Visualize". 2-input to 1-output surface/contour plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select a third input and click "Visualize". 3-input to 1-output Isosurface plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Uncertainty Analysis" and click "Analyze". PDF and CDF plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Sensitivity Analysis" and "First-order", and click "Analyze". First-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Second-order", and click "Analyze". Second-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Total-order", and click "Analyze". Total-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Click "Infer..."
- "Bayesian Inference of Ensemble" window opens
- Select "removalCO2" and "removalH2O" as "observed" outputs
- Make sure all the inputs are selected for display
- Click "Infer". Input Prior and Posterior Probability plots are generated
- Left click let the user zoom in on each individual distribution plot
- Right click let the user zoom out back to all the plots
- Close both figures and go back to "Bayesian Inference of Ensemble" window
- Click "Close" to go back to "Analysis of Ensemble" window
- Switch to "Expert Mode" by clicking on the "Mode" button at the top of the "Analysis of Ensemble" window
- Select "removalCO2" as output under analysis
- Select "MARS Ranking" as a parameter selection method and click "Compute input importance". A bar plot with parameter screening rankings is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Under "Ensemble Data Analysis" section, select "Uncertainty Analysis" and click "Analyze". PDF and CDF plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Correlation Analysis" and click "Analyze". Pearson and Spearman correlation coefficients plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Sensitivity Analysis" and "First-order", and click "Analyze". First-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Second-order", and click "Analyze". Second-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Total-order", and click "Analyze". Total-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select one input and click "Visualize". 1-input to 1-output scatter plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select a second input and click "Visualize". 2-input to 1-output scatter plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Under "Response Surface (RS) Based Analysis" section, select "Polynomial" and "Linear Regression"
- Specify an "Error Envelope" of 10.00%
- Click "Validate". Model Error Histogram and Actual vs. Predicted Data plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select one input and click "Visualize". 1-input to 1-output line plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select a second input and click "Visualize". 2-input to 1-output surface/contour plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select a third input and click "Visualize". 3-input to 1-output Isosurface plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Uncertainty Analysis" and "Aleatory Only"
- Click "Analyze". PDF and CDF plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Uncertainty Analysis" and "Epistemic-Aleatory". Remember to change the "Type" to "Epistemic" of at least one of the input variables
- Click "Analyze". Cumulative Distribution plots are generated
- Close the figure and go back to "Analysis of Ensemble" window
- Select "Sensitivity Analysis" and "First-order", and click "Analyze". First-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Second-order", and click "Analyze". Second-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window Select "Sensitivity Analysis" and "Total-order", and click "Analyze". Total-order sensitivity analysis bar plot is generated
- Close the figure and go back to "Analysis of Ensemble" window
- Click "Infer..."
- "Bayesian Inference of Ensemble" window opens
- Select "removalCO2" and "removalH2O" as "observed" outputs
- Make sure all the inputs are selected for display
- Click "Infer". Input Prior and Posterior Probability plots are generated
- Left click let the user zoom in on each individual distribution plot
- Right click let the user zoom out back to all the plots
- Close both figures and go back to "Bayesian Inference of Ensemble" window
- Click "Close" to go back to "Analysis of Ensemble" window
- Go to "OUU" tab
- Select "Load Model From File" and click "Browse..."
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "ouu_optdriver.in"
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, and variable 9-12 as Z3
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Discrete Random Variables", click "Browse..."
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "x3sample.smp"
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, and variable 9-12 as Z4
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Continuous Random Variables", select "Generate new sample for Z4"
- Set "Sample Scheme" to "Latin Hypercube" and set "Sample Size" to 200
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, and variable 9-12 as Z4
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Continuous Random Variables", select "Generate new sample for Z4"
- Set "Sample Scheme" to "Latin Hypercube" and set "ample Size" to 200
- Under "UQ Setup" and "Continuous Random Variables", check the "Use Response Surface" box
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, variable 9 as Z3, and variable 10-12 as Z4
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Discrete Random Variables", click "Browse..."
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "x3sample4.smp"
- Under "UQ Setup" and "Continuous Random Variables", select "Generate new sample for Z4"
- Set "Sample Scheme" to "Latin Hypercube" and set "Sample Size" to 100
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, variable 9 as Z3, and variable 10-12 as Z4
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Discrete Random Variables", click "Browse..."
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "x3sample4.smp"
- Under "UQ Setup" and "Continuous Random Variables", select "Generate new sample for Z4"
- Set "Sample Scheme" to "Latin Hypercube" and set "Sample Size" to 100
- Under "UQ Setup" and "Continuous Random Variables", check the "Use Response Surface" box
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, variable 9 as Z3, and variable 10-12 as Z4
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Discrete Random Variables", click "Browse..."
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "x3sample4.smp"
- Under "UQ Setup" and "Continuous Random Variables", select "Load existing sample for Z4"
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "x4sample4.smp"
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress
- Under "Variables", set variable 1-4 as Z1, variable 5-8 as Z2, and variable 9-12 as Z4
- Under "Optimization Setup" select the first objective function (default) and select "use model as optimizer" as the "Inner Solver"
- Under "UQ Setup" and "Continuous Random Variables", select "Load existing sample for Z4"
- Go to the directory "C:\Users\sotorrio1\foqus-1.0.0\examples\OUU\test_suite" and select the file "x4sampleLarge.smp"
- Under "UQ Setup" and "Continuous Random Variables", check the "Use Response Surface" box and set "Sample Size" to 100
- Go to "Launch/Progress" tab and click "Run OUU"
- User can see OUU Progress