moptipy is a library with implementations of metaheuristic optimization methods in Python 3 that also offers an environment for replicable experiments. It is structured with performance, ease-of-use, and generality in mind, but also based on an educational and research perspective. It is therefore (hopefully) suitable for practical industrial applications, scientific research, and for students who are just entering the field of metaheuristic optimization.
Metaheuristic optimization algorithms are methods for solving hard problems. moptipy provides an API, several algorithm implementations, as well as experiment execution and evaluation facilities for metaheuristics.
A metaheuristic algorithm can be a black-box method, which can solve problems without deeper knowledge about their nature. Such a black-box algorithm only requires methods to create and modify points in the search space and to evaluate their quality. With these operations, it will try to discover better solutions step-by-step. Black-box metaheuristics are very general and can be adapted to almost any optimization problem. They allow us to plug in almost arbitrary search operators, search spaces, and objective functions. But it is also possible to develop algorithms that are tailored to specified problems. For example, one could either design the search operators and the optimization algorithm as a unit. Then, the algorithm could change its way to sample new points based on the information it gathers. Or one could design an algorithm for a specific search space, say, the n-dimensional real numbers, which could then make use of the special features of this space, such as arithmetic and geometric relationships of the points within it. Or one could design an algorithm for a specific problem, making use of specific features of the objective function. Finally, there are multi-objective optimization problems where multiple, potentially conflicting, criteria need to be optimized at once.
Within our moptipy framework, you can implement algorithms of all of these types under a unified API. Our package already provides a growing set of algorithms and adaptations to different search spaces as well as a set of well-known optimization problems. What moptipy also offers is an experiment execution facility that can collect detailed log information and evaluate the gathered results in a reproducible fashion. The moptipy API supports both single-objective and multi-objective optimization. A set of "How-Tos" and a longer list of examples are provided. You can also take a look at our moptipy flyer at https://thomasweise.github.io/moptipy/_static/moptipy_flyer.pdf.
moptipy can easily be installed from PyPi by doing "pip install moptipy". After this, you can use the library to either do your own experiments or to play with the example programs listed at https://thomasweise.github.io/moptipy/#examples.