Optimization Extension Examples

In the package ACT Templates for DesignXplorer, three extension examples show how to optimize the design space. Each of these extensions uses a different programming language, allowing you to see how you can accomplish this objective using IronPython, C#, or C/C++.

Example NameDescription

PythonOptimizer

Fully implemented in IronPython (no build required), this example is your sandbox. It demonstrates many optimization extension features and is definitely the best example to start with.

PythonOptimizer is running a simple random exploration of the parametric space, generating the number of points requested by the user and returning the best candidates found.

CSharpOptimizer

This example demonstrates how an extension can be completely set up when the interface IOptimizationMethod is implemented in C#.

Note that the optimization algorithm is also implemented in C#, but one could use only the IOptimizationMethod implementation as an adapter to an existing implementation in C# or other languages.

The project is provided for Microsoft Visual Studio 2010.

CppOptimizer

This example demonstrates how an extension can be implemented from existing C/C++. The interface IOptimizationMethod is implemented in IronPython as a wrapper to the C++ symbols, using the ctypes foreign function library for Python.

Release 18.2 - © ANSYS, Inc. All rights reserved.