Genetic Algorithm Constrait Penalization

조회 수: 2 (최근 30일)
Gökhan Kof
Gökhan Kof 2017년 1월 8일
답변: Ed Marquez 2017년 1월 12일
Hi,
I want to solve an IP w/ GA but I do not want to enter linear constraints. I want to penalize the unsatisfied constraint amount from the fitness function. I can just write an appropriate fitness function but I want the penalty coefficient to increase as I go to future iterations so that at the end I won't end up with an infeasible solution.
Thanks

답변 (1개)

Ed Marquez
Ed Marquez 2017년 1월 12일
You could specify additional options for the 'ga' function you are using. You can start by creating a variable 'options' that uses optimoptions,
options = optimoptions(@ga)
Refer to the link below to see all the options and values you can assign to those options:
https://www.mathworks.com/help/gads/gaoptimset.html
Once you create the 'options' variable, you can change the NonlinearConstraintAlgorthm property to 'penalty' and this may get you closer to the behavior that you are after. Refer to the link below (Penalty Algorithm Section) to better understand how the problem is solved when the NonlinearConstraintAlgorithm option is changed:
https://www.mathworks.com/help/gads/description-of-the-nonlinear-constraint-solver_bqf8bdd.html

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by