# HS-4000: Optimization Method Comparison: Arm Model Shape Optimization

Learn how to perform an Optimization and compare different methods for efficiency and effectiveness.

Before you begin, complete HS-3000: Fit Method Comparison - Approximation on the Arm Model or import the HS-3000.hstx archive file, available in <hst.zip>/HS-4000/.
The corresponding output response values for your baseline design (all shape variables set to 0.0) were:
• Volume = 1.77E+06 mm3
• Max_Disp = 1.41 mm
• Max_Stress = 195.29 MPa

In this tutorial, the Optimization objective is to reduce Volume, while respecting a constraint on Max_Disp that should be less than 1.5 mm.

In HS-3000: Fit Method Comparison - Approximation on the Arm Model, you learned that it was difficult to accurately capture the Max_Stress function using a Fit approximation. In the DOE analysis, you learned that most of the tested design configurations for Max_Stress were below 300 MPa. For these reasons, you will not consider a constraint on the Max_Stress function. Max_Stress values can be collected throughout the Optimization when running the exact solver.

## ARSM, Six Input Variables, Exact Solver

1. In the Explorer, right-click and select Add from the context menu.
2. In the Add dialog, select Optimization and click OK.
2. Go to the Optimization 1 > Definition > Define Input Variables step.
4. Go to the Optimization 1 > Definition > Define Output Responses step.
5. Click the Objectives/Constraints - Goals tab.
2. In the Apply On column, select Volume.
3. In the Type column, select Minimize.
2. In the Apply On column, select Max_Disp.
3. In the Type column, select Constraint.
4. In column 1, select <= (less than or equal to).
5. In column 2, enter 1.5.
8. Go to the Optimization 1 > Specifications step.
9. In the work area, set the Mode to Adaptive Response Surface Method (ARSM).
Note: Only the methods that are valid for the problem formulation are enabled.
10. Click Apply.
11. Go to the Optimization 1 > Evaluate step.
13. Click the Iteration History tab to view the optimum solution, which is highlighted green in the table.
Note: The optimal design for Max_Stress is equal to 215, which is lower than 300.
14. Click the Iteration Plot tab to review the results of the optimization in an iteration plot.
1. Select the Objective (Volume) and Constraint (Max_Disp) functions to see their variations during the Optimization process.
2. Select all of the design variables to see their variations during the Optimization process.
Note: Check if any of the input variables meet their bounds in the optimal design. If any input variable's values meet their bounds, this indicates that relaxing these bounds may enable you to find better solutions. In Figure 6, only length_2 and length_5 meet their lower bounds.

## ARSM, Nine Input Variables, Exact Solver

1. Run a single objective, deterministic Optimization study by repeating ARSM, Six Input Variables, Exact Solver, except in the Optimization 2 > Definition > Define Input Variables step, activate all input variables.
2. Click the Iteration History and Iteration Plot tabs to review the results of the Optimization.
3. Select the Objective (Volume) and Constraint (Max_Disp) functions to see their variations during the Optimization process.

## GRSM, Six Input Variables, Exact Solver

1. Run a single objective, deterministic Optimization study by repeating ARSM, Six Input Variables, Exact Solver, except in the Optimization 3 > Specifications step, set the Mode to Global Response Search Method (GRSM).
2. Click the Iteration history tab to review the results of the Optimization in a table.
Note: The optimal solution is found at the 19th evaluation (from 50).
3. Review the results of the Optimization in an iteration plot.
1. Click the Iteration Plot tab.
2. Select the Objective (Volume) and Constraint (Max_Disp) functions to see their variations during the Optimization process.

## SQP, Six Input Variables, Exact Solver

1. Run a single objective, deterministic Optimization study by repeating ARSM, Six Input Variables, Exact Solver, except in the Optimization 4 > Specifications step, set the Mode to Sequential Quadratic Programming (SQP).
2. Click the Iteration Plot tab to review the results of the Optimization in an iteration plot.
3. Select the Objective (Volume) and Constraint (Max_Disp) functions to see their variations during the Optimization process.

## SQP, Six Input Variables, RBF_MELS

1. Run a single objective, deterministic Optimization study by repeating ARSM, Six Input Variables, Exact Solver, except change the following:
1. Go to Optimization 5 > Definition > Define Output Responses step, set Evaluate From to Fit, RBF (fit_4) for Max_Disp and Volume.
2. In the Active column, clear the checkbox for Max_Stress.
3. In the Optimization 5 > Specifications step, set the Mode to Sequential Quadratic Programming (SQP).
2. Review the results of the Optimization in an iteration plot.
1. Click the Iteration Plot tab.
2. Select the Objective (Volume) and Constraint (Max_Disp) functions to see their variations during the Optimization process.
3. For Optimizations using a Fit, it is recommended that you perform a validation run of the optimal solution.
1. Click on the Iteration History tab.
2. Select the parameter values for the optimal solution, then right-click and select Copy (Ctrl + C) from the context menu.
3. Go to the Optimization 5 > Specifications step.
4. Click Edit Matrix > Run Matrix from the top-right corner of the work area.
The Edit Run Matrix dialog opens.
5. Click Add Run and paste (Ctrl + P) the copied values.
6. For height, enter 1.
7. Click Apply, then click OK to close the dialog.
8. Go to the Optimization 5 > Evaluate step.
10. Click the Evaluate Data tab and compare the Volume and Max_Disp values to those found by the Optimization.
Notice the similarity.

## GA, Six Input Variables, RBF_MELS

1. Run a single objective, deterministic Optimization study by repeating ARSM, Six Input Variables, Exact Solver, except change the following:
1. Go to Optimization 6 > Definition > Define Output Responses step, set Evaluate From to Fit, RBF (fit_4) for Max_Disp and Volume.
2. In the Active column, clear the checkbox for Max_Stress.
3. In the Optimization 6 > Specifications step, set the Mode to Genetic Algorithm (GA).
2. Review the results of the Optimization in an iteration plot.
1. Click the Iteration Plot tab.
2. Select the Objective (Volume) and Constraint (Max_Disp) functions to see their variations during the Optimization process.
3. As you did in the previous Optimization (SQP, 6 IV, RBF_MELS), it is suggested that you perform a validation run to compare the values provided by the Fit and by the solver.

## Optimization Methods Comparison

The number of evaluations and the optimum found using the different Optimization methods are compared in the table below. ARSM and GRSM are both response surface based methods. Even though ARSM is the default method for single objective problems, it can fail when a global optima is required. In such cases, it is suggested that you use GRSM. The best volume decrease was obtained using GRSM by means of 50 solver evaluations. When SQP was used with a solver, a good solution was found at the expense of additional evaluations. Also, when SQP is used with a solver, it is sensitive to the starting point. When GA was applied on a Fit, a solution similar to GRSM was found. GA was not run with the exact solver because it requires many evaluations. In conclusion, GRSM or GA on a fit are the most efficient methods to solve the Optimization problem.
Table 1.
Optimization Method # of Evaluations Volume Objective
ARSM, 9 IVs, Exact Solver 14 1702450.0
ARSM, 6 IVs, Exact Solver 11 1703330.0
GRSM, 6 IVs, Exact Solver 50 (22nd is the optimum) 1652830.0
SQP, 6 IVs, Exact Solver 179 1659730.0
SQP, 6 IVs, Fit - 1666990.6
GA, 6 IVs, Fit - 1665387.3

## Reliability-Based Design Optimization Study

In this step, run a reliability based design optimization study.

This topic will be discussed in HS-5000: Stochastic Method Comparison: Stochastic Study of the Arm Model

You will be searching for 95% reliability on the Optimization constraint (Max_disp < 1.5 mm). You will use fitting functions as opposed to the exact solver to evaluate the output responses. Among the approximations, you will use the RBF that was created with the MELS DOE. As a result, you will be using the SORA method. You will continue using the six important input variables, which will all follow a normal distribution with a variance of 0.1.

## Multi-Objective Optimization Study

In this step, you will run a multi-objective optimization study.

This topic will be discussed in HS-4425: Multi-Objective Shape Optimization Study.

You will be searching for the Pareto front that minimizes both volume and maximum displacement. You will be using MOGA with a Fit to save time.
Note: If a Fit was not available, GRSM would be the suggested method to use in order to solve a MOO problem. MOO problems require many evaluations, therefore GRSM is more efficient than MOGA.