# Section optimization SHS

### Description

This script tries to find an optimal section for an already existing and loaded structure. This version focuses only on SHS sections. The list of available section sizes are read from an Excel spreadsheet, which can be modified.

Algorithm:
- List all members that currently have SHS sections. These will be optimized
- Load all available SHS sections into the model based on the Excel spreadsheet
- Run an initial analysis with existing sections
- Based on static results set an initial section size for each member
- Start design iteration:
- Run analysis and design calculation
- Check if utilization is below the maximum limit with the smallest possible section size for all members
- Change sections accordingly
- Repeat until exit criteria is met for all members, or section sizes can no longer be increased or decreased based on the available selection
- End script run

Attachment files are saved to the following storage location: C:\Users\[Current User]\Documents\ConSteel\MyDescripts

Current version: 1.3 (release date: 2022.03.21.)
Fixes:
- Fixed an issue, where if the initial section finding algorithm did not find an available section with large enough section parameters, it would leave the existing section. Now in this case it sets the largest available section. This potentially reduces the number of design iteration cycles later, making the script run faster.
- Fixed a bug, where the design iteration could not apply the largest section size from the list of available sections.

v1.2 (release date: 2022.03.09.)
Improvements:
- Updated initial section finding algorithm that speeds up the process in case of large number of load combinations.
- Updated iteration that speeds up the process by iterating only on critical load combinations. This is also most helpful in case of large number of load combinations.
- Added all possible section names to Excel section list. This way it is more convenient to just copy and paste the section names I want to use for the optimization from the full list to the 1st column of the spreadsheet.

- Changed 'SET [Member ID] SectionID [Section ID]' commands following related Consteel bugfix

v1.1 (release date: 2021.11.29.)
Improvements:
- The Excel spreadsheet with the list of available sections is now kept open for possible modification while the user input dialogue is displayed

v1.0 (release date: 2021.10.22.)

Known limitations:
- Only works with S235 steel grade

To DOWNLOAD this script, navigate to the MyDescript interface within Consteel, then click the "Edit" button next to the name of the script in the list. From there, the script can be saved to the computer. The availability of the "Edit" button depends on your membership level.