Open siyahkut opened 3 years ago
Hi, how to add constraints in the code. Does it work with a Multi-objective Integer problem. I mean my optimization variables take only integers. Thanks.
Hi All, Thank you very much much considering openGA. Sorry for the delay. In case of urgency, please contact me through the email in the document.
@siyahkut, There is no maximization. If you want to maximize, please minimize the negation of the fitness (cost = - fitness).
@vudumus , For adding constraints, it is easy. If you want to reject a solution, return false in the evaluation function (eval_solution
). It can be at the beginning, during of after the evaluation.
Generally i saw there is minimizing cost example. Are there any maximizing cost (target) example? Or which function i have to override for that?
thanks in advance