Is there any Python library as published on PyPi, with genetic algorithm (GA) or GA inspired solver that helps with constrained optimization?
I am aware of Matlab's GA solver and also aware that costs of constraint violations can form part of my objective to minimize. But wanted to check if there's a library that can run on Python where I can specify the objective and an array of constraints.
$\begingroup$
$\endgroup$
1
-
$\begingroup$ not sure if these help; scipy.optimize.differential_evolution and in PyPI geneticalgorithm 1.0.2 $\endgroup$– uhohCommented Dec 15, 2022 at 21:29
Add a comment
|
3 Answers
$\begingroup$
$\endgroup$
Not exactly what you are needing, but DEAP allows to pass constraints as a decorator: https://deap.readthedocs.io/en/master/tutorials/advanced/constraints.html .
$\begingroup$
$\endgroup$
Try optapy.
No genetic algorithms, but several other, more advanced metaheuristics. See https://www.optapy.org for more info.