giacomelli / GeneticSharp

GeneticSharp is a fast, extensible, multi-platform and multithreading C# Genetic Algorithm library that simplifies the development of applications using Genetic Algorithms (GAs).
MIT License
1.26k stars 330 forks source link

Adding as constraint to GA instead of additional objective in FuncFitness #75

Closed debashis66 closed 1 year ago

debashis66 commented 4 years ago

Hi Diego

How can we add constraints to GeneticAlgorithm - in my objective function defined in FuncFitness: we return 1/ (g(x) + h(x)), where g and h are defined on the chromosome values. I wanted to simplify the objective to just return 1/(g(x)) and add h(x)=0 as an additional constraint outside of the objective function

Is it possible to do this and any examples for the same ?

Thank you

giacomelli commented 1 year ago

I think I really don't get what you want to say with simplify the object.

Can you provide a sample code of what you have tried so far?

giacomelli commented 1 year ago

Closed due to inactivity. Feel free to reopen it if needed.