> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example 15: Sequential Optimization

Ex 15: The quick focus and optimization tools are demonstrated. A sample file is opened, and the ‘remove all variables’ and ‘quick focus’ tools are used. Some variables and solves are specified, and a merit function is generated with the merit function wizard. The local, global, and hammer optimizers are each run and closed in sequence.

```csharp theme={null}
Input:      Short course\sc_dbga1.zos

Output:     API\e15_Seq_Optimization\OptimizedFile.zos
            API\e15_Seq_Optimization\OptimizedFile1.zos
            API\e15_Seq_Optimization\OptimizedFile2.zos
            API\e15_Seq_Optimization\OptimizedFile3.zos
            API\e15_Seq_Optimization\RMS_Spot_Radius.mf
            API\e15_Seq_Optimization\OptimizedFile4.zos
```

[C#](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex15_cs.md)

[C++](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex15_cpp.md)

[Matlab](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex15_m.md)

[Python](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex15_py.md)
