High performance optimization algorithm for nonconvex systems based on random tree search
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Duplex Optimization


Duplex's website

Duplex is a high-performance global optimization algorithm for nonconvex, nonlinear, and functional optimization problems. The following core capabilities are included:

  • Duplex can find global optimum of nonlinear non-convex functions.
  • Duplex implements variety of gradient-descent based optimizations internally, such as Momentum, AdaDelta, Adamax. Duplex can also optimize when the gradient information are not available.
  • Duplex supports unsupervised learning algoriths for clustering.
  • If the gradient information are not available (for circuit optimization), duplex uses reinforcement learning to predict the landscape of energy function.
  • Duplex supports Synopsys HSPICE for solving nonlinear systems.

The latest release and a complete manual may be found at the Duplex home page: http://adel.ac/duplex


Duplex requires the following dependencies to be installed:

  • Eigen 3.3.0 linear algebra library. Install eigen using brew install eigen
  • Boost 1.51 Duplex requires both headers and compiled binaries. Install using brew install boost
  • Config4cpp configuration library. The binaries for the config4cpp for macOS are already shipped with Duplex (/submodules/config4cpp/lib).
  • Pangolin for plotting and managing display. The Pangolin will replace the gnuPlot. Duplex will install Pangolin as a submodule in /submodules/Pangolin.
  • GnuPlot for drawing plots (Optional). Install gnuplot using brew install gnuplot


Duplex uses CMake as a build system.

git clone git://github.com/ahmadyan/Duplex
cd Duplex
mkdir build	
cd build
cmake ..

Use cmake .. -GXcode to generate the xcode project file (or other generators). Few examples are provided in /bin directory. Few MATLAB tests are available in the /test directory.


  • ./duplex --config example.cfg
  • Currently the duplex binaries and the configurations has to be in the same directory, so please output the binary in the bin folder.
  • Example configuration files are available in the /bin directory
  • If using hspice as a numerical simulator, User should set an environment variable DUPLEX_SIM_ID to an integer value. If you don't want to set the environment variable, run Duplex from the python wrapper (test/duplex.py) in test directory. Python wrapper requires Python 3+.


Duplex uses llvm coding style. Any PR will be formatted using clang-format.