Converting evolutionary optimization problem from Excel to Python

I've set up and successfully executed an evolutionary optimization in Excel, and now have a need to convert the problem to Python. differential_evolution() in the optimize package would seem to get me there, but doesn't appear to allow for the setting of a constraint such as x1 < x2 (where x1 and x2 are elements of the decision variable vector).

Any suggestions?

• Can you detail your evolutionary optimization ? – Kuifje Feb 1 at 15:45

x1 = min(x[1],x[2])

Now x1 <= x2 automatically holds and you don't need the constraint. (Assuming you can live with <= instead of <).