How does penalty factor is applied?

2 views (last 30 days)
Vitor Ribeiro
Vitor Ribeiro on 23 Feb 2015
Commented: Vitor Ribeiro on 26 Jul 2017
Hello.
I am trying to work with ga() function with integer variables. I want to know how can penalty be applied at unfeasible solutions? How do I define unfeasible solutions as unfeasible?
Actually I am doing this by my own at fitness function. Is it the only way?
Thanks, Vitor Ribeiro.

Answers (1)

Alan Weiss
Alan Weiss on 23 Feb 2015
It is difficult to know what you are asking. The documentation of mixed-integer ga explains pretty much what goes on in that implementation. If you are doing your own implementation, then you are on your own, unless you give more details and ask a specific question.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Comment
Vitor Ribeiro
Vitor Ribeiro on 26 Jul 2017
Hi Alan. I was quiet for a while about this project, but now I am back and I would like you to answer another question regarding GA function on MATLAB. I've read the article about MILP ga, but i don't understand a point.
I am using GA with binary variables and equality constraints adapted by 2 inequality constraints so the sum(x) of the solution vector is equal to Y.
When the algorithm generates new populations applying the special crossover and mutation functions the solutions generated from a feasible one, may now be unfeasible.
So it is not supposed that algorithm evaluate the restrictions and apply penalty function on this unfeasible solutions, rather than evaluate them by fitness fcn?
I have a heavy fitness function and loads of unfeasible solutions that cannot be controlled by input constraints, only inside fitness fcn applying a proper penalty function. So, I would like the algorithm eliminate the ff evaluation of solutions that don't go through basic constraints.
Sorry if my english is a little bit confusing but I hope you can help me out with this.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!