guofei9987 / scikit-opt

Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)
https://scikit-opt.github.io/scikit-opt/#/en/
MIT License
5.3k stars 989 forks source link

Question About "constraint_ueq" #232

Open BILL-Liu301 opened 2 months ago

BILL-Liu301 commented 2 months ago

I hope that the solution obtained by solving the inequality constraint satisfies a decreasing trend over time. I wrote it that way👇, but it didn't work during the solution process. Could you please tell me why?

constraint_ueq = [ lambda x: x[i + 1] - x[i] for i in range(n_dim - 1) ]