Optimization of the model is done by using the Optimize command:
Icon 
Ribbon 

Parameters > Tools > Optimize 

Keyboard 
Textual Menu 
<PO> 
Parameters > Optimize 
The command is intended for solving problems of optimization of a 2D drawing or 3D model. The solution to the problem is to select the values of the existing variables that best satisfy the stated conditions. The command can be called only if there are numerical variables in the document.
After calling the command, the Optimization Tasks window appears, containing a list of generated optimization tasks.
The column Name displays the name of the variable, whose value is optimized by the current task. The column Comment contains textual strings entered by the user.
A TFLEX CAD document may contain any number of optimization tasks.
The graphical buttons at the bottom of the dialog box allow the following actions:
•Add. Entering a new optimization task.
•Delete. Deleting the task of the current list item.
•Properties. Displays Optimization Parameters dialog box of the current list item task.
•Run. Starts the optimization computations. The system seeks for the solution according to the specified optimization parameters and regenerates the drawing or the 3D model with the found variable values.
•Close. Exits the command.
Optimization task definition
Upon pressing the Add button, the Optimization Parameters dialog box is displayed that contains the following fields:
Goal. Keeps the textual string that is the comment of this optimization task. Next are the combo box for selecting the target function (Make Equal, Minimize, Maximize), the variable Name combo box and the Tolerance input box. The variable is selected from the list containing all numerical variables present in the document. If the selected function type is Make Equal, then the input box becomes accessible for entering the target value of the variable.
The tolerance value defines the admissible range of the values of the target variable within which the optimization task is considered solved.
Limitations. Defines the list of restrictions on the model variables when performing the optimization. New limitations are entered upon pressing the Add button.
In the Variable box, set the name of the desired variable (one variable can be subject to multiple restrictions). In the "Condition combo box, select one of the comparison types (<, >, <=, >=) for comparing the variable against the target value (the Value input box). To modify the entered limitations, use the button Properties that allows editing all fields of the current line in the limitations list. Pressing the Delete button deletes the current line of the limitations list.
Variables. This is the list of variables whose values will be the subject to the optimization process. The range of admissible values is to be defined for each variable. To be formulated correctly, the optimization task requires defining the range of admissible values for at least one variable. The graphic buttons Add, Properties and Delete work similar to those described in the previous section. To define a new record, you need to fill in the following entries:
Set the variable name by selecting from the list in the Variable combo box (each variable can have only one the range of admissible values).
The entries Minimum and Maximum define the bounding values of the variable's range of admissible values. When solving the optimization task, the values of the variables are tried that satisfy the set of the limitations and fall in the range of admissible values. Once a limitation is defined for a variable, its name is no longer available for defining the range of values, and vice versa. The variable whose value is the target of the optimization is not included in the lists of variables when defining limitations and the value ranges.
Run. This parameter takes one of the following values:
•User. The optimization task will run only upon user pressing the bottom Run in the Optimization Task dialog box. Optimizing may take long time on complicated drawings or 3D models. The described setting allows skipping optimization when regenerating the model.
•On optimal Model Regeneration (<F7>  for 2D window, <3><G>  for 3D window). The optimization task will run upon partial (optimal) model regeneration (when only modified elements are regenerated).
•On full Model Regeneration (<Ctrl><F7>  for 2D window, <3><R><G>  for 3D window). The optimization task will run upon full model regeneration.
Optimization algorithm selecting
1. Fast Search. This method is suitable for functions with one or two extremes.
2. Iterative Search. This method is suitable for functions with complicated behavior and multiple extremes.
3. Dichotomy. This method is suitable for functions of one variable.
•Show current result. If this flag is set, the Finding Solution window dynamically displays the variable values as the solution progresses.
•Recalculate 3D model. Setting this flag forces the 3D model regeneration at each step of the optimization algorithm. If the target function of the optimization (the variable) is related to 3D elements, then this flag is required for proper optimization process.
Topics in this section: