The following example involves minimizing the cogging torque (an undesirable effect) in a brushless DC motor.

A model that has been created in either MagNet, ElecNet or ThermNet, is opened by OptiNet (by specifying the location and file name). In this example, the file "BDC - Cogging Torque.mn" is opened.
The view area is updated with a preview of the model selected. Because of geometrical symmetry, only a portion of the device has been drawn (due to MagNet's Odd Periodic Boundary Condition - Please refer to the MagNet section for more details)
The next step involves choosing the simulation type (both program and specific solver module) that will be used to analyze the model. The drop down list displays all solvers available for each software. In this example, MagNet's static 2D solver will be used.
All parameterized values in the MagNet model are treated as design variables by OptiNet. In this example, there are 4 design variables that will be optimized (see diagram for details).

The parameterized variables of the model are automatically listed on the Variables page. For each variable, the user can specify the type (constant, continuous-valued, discrete-valued stepping or list), the initial value, the min-max bounds and the unit.

In this example, the MagNet model contains a total of six parameterized values. Variables r and th will not be optimized, they have been set as constant. All other variables are set as continuous-valued. The specific values can be viewed by enlarging the image on the right, which displays the Variables page of this example.

Once the variables are properly setup for optimization, the next step is specifying the objectives. Objectives are the criteria which the performance is evaluated against to determine if a particular design variation yields the desired improvement. Commonly needed objectives are included with OptiNet however users can easily create their own. Each objective requires specifying the arguments as well as choosing the goal type (minimized or maximized). There can be multiple objectives assigned to one problem; their respective global priority is indicated by a user assigned weight. In this case, the sole objective is to minimize the cogging torque; the expression used can be seen by enlarging the image on the right.
Constraints allow the user to specify criteria that must be satisfied in order for a design to be acceptable. Just as with objectives, common constraints have been preprogrammed with the option of creating new ones. Constraints are either "must-be" (absolute) or "should-be" with a weight to indicate their global priority. In this example, the constraint is to ensure a minimum running torque; the expression used can be seen by enlarging the image on the right.
Users have several options for controlling the length of the optimization process: specifying the maximum number of solutions to be found, the search tolerance (which represents the minimum step length that the optimizer can move within the feasible region) and time limit. Users can also choose an initial seed value for the random number generator, which dictates what direction in the design space should be initially searched. This is useful when performing multiple optimizations on the same model.
The Progress tab displays the evolution in the goal, variables, constraints and objectives during the optimization process. Improved solutions are indicated on the graphs by a star and the specific values can be displayed by clicking on a location on the graph. The user can also use the Stop feature to end the optimization process but keep the report and results up to that point. For more information, see the Optimization Process section.
The Report tab displays the results of each solution determined. Users can choose to view all solutions or only improved solutions. The results for each solution include: time to solve, the values of the goal, variables, constraints and objectives. Analyzing the change in value of a variable for the entire optimization process indicates their sensitivity to the overall performance. Users can also view an animation of the metamorphosis from initial to final design and a model view using a particular solutions variable values.

Final Design

The final design was produced after running for 12850 seconds (about 3.5 hours) on an AMD Athlon XP2800+ (2.08 GHz processor). As can be seen, the cogging torque has been reduced significantly. The cogging torque had dropped significantly during the first 20 minutes of the optimization process and during the remaining time OptiNet tried to find further improvements.